Commit graph

34655 commits

Author SHA1 Message Date
Paul Duffin
ae542a58af Allow customization of all fixture state at once
Adds FixtureCustomPreparer.

Bug: 181070625
Test: m nothing
Change-Id: I310e16661a0f032f778481d9b69da2e0e9a084cf
2021-03-20 10:25:45 +00:00
Jaewoong Jung
263426431a Take Module implementations out of java/java.go.
Test: TreeHugger
Change-Id: I5c39915ad2cadf5981c201a2b412916524d4c3e2
2021-03-19 15:46:38 -07:00
Julien Desprez
0387862185 Merge "Migrate manifest_*_test out of test mapping" 2021-03-19 21:47:24 +00:00
Paul Duffin
479605bed7 Merge changes I6b868bac,If75f4718
* changes:
  Migrate android package to a per test build directory
  Convert android/path_properties_test.go to test fixtures
2021-03-19 17:28:38 +00:00
Colin Cross
d2db7953a0 Merge changes Iab4e09d9,Icf2f24dd,I15be5ef1,Ic0db9619
* changes:
  Run lint actions in sbox
  Support sbox-in-RBE
  Move android package on top of remotexec
  Support sandboxing inputs in RuleBuilder
2021-03-19 17:25:14 +00:00
Julien Desprez
2dc86b2956 Migrate manifest_*_test out of test mapping
Unit tests do not require an explicit TEST_MAPPING config

Change-Id: Ieccebc78a26b9555803a2278e2962d0b388a6957
Test: presubmit
Bug: 183209529
2021-03-19 17:16:16 +00:00
Liz Kammer
a4aa43072b Handle include_build_directory prop in bp2build
Test: go test cc tests
Test: generate bp2build, sync bp2build, bazel build //bionic/...
Bug: 181794963
Change-Id: I8dcef585e3025ef6f44d22430ed67b1e0429dca0
2021-03-19 12:33:34 -04:00
Yi Kong
00d54280d0 Merge "[strip.sh] Move remaining GNU binutils usage to llvm binutils" 2021-03-19 15:32:49 +00:00
Paul Duffin
54a5e9a467 Merge "Remove javaMockFS()" 2021-03-19 14:18:46 +00:00
Paul Duffin
89fbdb2387 Merge "Fix TestTurbine to work without javaMockFS()" 2021-03-19 11:11:42 +00:00
Paul Duffin
64df56def9 Merge "Fix testDexpreoptBoot to work without javaMockFS()" 2021-03-19 11:09:21 +00:00
Paul Duffin
750f8f3515 Merge "Fix TestClasspath to work without javaMockFS()" 2021-03-19 11:08:35 +00:00
Paul Duffin
903a8a08ab Merge "Convert TestClasspath to test fixtures" 2021-03-19 11:08:17 +00:00
Jingwen Chen
b1672af5d2 Merge "bp2build: cc_library_headers converter should only include that module type" 2021-03-19 09:18:15 +00:00
Yi Kong
ad50ce8349 [strip.sh] Move remaining GNU binutils usage to llvm binutils
With clang r377782, llvm binutils implements all the necessary
funtionaility for strip.sh. We can finally get rid of all the fallback
GNU binutils usage.

Test: m
Bug: 141010852
Bug: 135627985
Change-Id: I110f6028dab7f599decf59a5cb1b927b35e11857
2021-03-19 12:28:44 +08:00
Pirama Arumuga Nainar
c7d23478e1 Switch to clang r416183 12.0.4.
Bug: http://b/181927912

Test: go/android-llvm-testing-dashboard tag: test_clang_r416183
      go/android-llvm-windows-testing
      go/ab/P20855845 sdk_phone_armv7-sdk_mac build on Forrest
      Forrest run L21700000838126631 for CtsNNAPITestCases

Change-Id: If677b57616348ae52704494f40c7b1ed470bb5f4
2021-03-19 01:14:20 +00:00
Inseob Kim
fc8e9c7f00 Merge "Add sepolicy related variables" 2021-03-19 00:07:58 +00:00
Justin Yun
b1d5479783 Merge "Define __ANDROID_VENDOR__ and __ANDROID_PRODUCT__" 2021-03-18 23:33:43 +00:00
Colin Cross
1661aff8be Run lint actions in sbox
Run lint actions in sbox with RuleBuilder.SandboxInputs.  This
copies all input files into the sandbox, which prevents the lint
tool from finding nearby source files that were not presented to it.

Using SandboxInputs requires use of PathForInput or PathForOutput
anywhere a path is used outside of the RuleBuilderCommand methods
that take paths so that they can be translated to the paths that
will be used in the sandbox.

Bug: 181681346
Test: lint_test.go
Test: m lint-check dist
Test: m USE_RBE=true RBE_LINT=true lint-check dist
Test: m USE_RBE=true RBE_LINT=true RBE_LINT_EXEC_STRATEGY=remote lint-check dist
Change-Id: Iab4e09d961891ef182643583d4d456e413bc5e39
2021-03-18 16:17:34 -07:00
Colin Cross
ef972743e8 Support sbox-in-RBE
Allow passing a remoteexec.REParams to RuleBuilder to configure it to
run the rule remotely through RBE.  Requires the rule to use
SandboxInputs, which ensures that RuleBuilder is aware of all of the
inputs and outputs of the rule.

Running sbox in RBE initially seems unnecessary, as RBE is already a
good sandbox, but reproxy can execute RBE actions locally when configured
for local execution, local fallback or racing.  Using sbox in RBE ensures
that these local actions are also sandboxed, giving consistent results
between directly executed actions, local RBE actions, and remote RBE
actions.

Bug: 182612695
Test: manual
Change-Id: Icf2f24dde8dee833eb680ba22566a8e1c0143b15
2021-03-18 16:17:34 -07:00
Colin Cross
77cdcfdeaf Move android package on top of remotexec
Remove the references to the android package in remotexec so that
the android package can reference the remoteexec package.  This
will allow RuleBuilder to integrate directly with remoteexec.

Bug: 182612695
Test: m checkbuild
Change-Id: I15be5ef126d8aacbd605518638f341daf6f31bb3
2021-03-18 16:17:34 -07:00
Colin Cross
ab020a7333 Support sandboxing inputs in RuleBuilder
When RuleBuilder.SandboxInputs() is called configure sbox to copy
all the input files into the sandbox directory and then change the
working directory there when running the command.

Copying input files into the sandbox directory gets tricky when
the input file is the output file from another rule, and could
be at an arbitrary, possibly absolute path based on the value
of OUT_DIR.  They will need to be copied to a directory in the
sandbox using the path relative to OUT_DIR.

RSP files need special handling, they need to both be copied into
the sandbox as an input, rewritten to contain paths as seen in the
sandbox, and references to them on the command line need to use
sandbox paths.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: Ic0db961961b186e4ed9b76246881e3f04971825c
2021-03-18 16:17:32 -07:00
Jingwen Chen
c5a0089ac4 Merge "bp2build: genrule converter only supports "genrule"." 2021-03-18 22:41:52 +00:00
Jingwen Chen
c7846f38fa bp2build: cc_library_headers converter should only include that module type
Test: bp2build; bazel build //bionic/...
Change-Id: I34768b51098c5b801e7c6d9b3a95ec0f37c3bb09
2021-03-18 18:35:39 -04:00
Colin Cross
a5d09762a6 Merge changes Idcbe2046,I09616402,Ide2f1ed9
* changes:
  Fix sbox in chdir mode
  Check RuleBuilder temporaries for path errors
  Fix WriteFileRule escaping
2021-03-18 22:28:11 +00:00
Tri Vo
0e3758caea Merge "Remove "-C link-dead-code=y" flag" 2021-03-18 21:27:54 +00:00
Treehugger Robot
d19b824e7f Merge "Check for frameworks/base/Android.bp instead of frameworks/base" 2021-03-18 20:56:54 +00:00
Kousik Kumar
47665870d7 Merge "Allowlist RBE_num_retries_if_mismatched variable" 2021-03-18 19:13:29 +00:00
Paul Duffin
813bfcb252 Merge "Convert android/packaging_test.go to test fixtures" 2021-03-18 18:38:34 +00:00
Paul Duffin
387f4ce1ee Merge changes Iccba8caf,I1eb49f25,Id77575f8,I5679cb51,I7f9f3eb6, ...
* changes:
  Convert android/ninja_deps_test.go to test fixtures
  Add NinjaDeps to TestResult
  Convert android/singleton_module_test.go to test fixtures
  Convert android/neverallow_test.go to test fixtures
  Convert android/singleton_module_test.go to test fixtures
  Convert android/variable_test.go to test fixtures
  Convert android/soong_config_modules_test.go to test fixtures
  Convert android/mutator_test.go to test fixtures
  Convert android/deptag_test.go to test fixtures
2021-03-18 18:18:38 +00:00
Paul Duffin
000ae662fa Merge changes I2e69e7b5,I3c9c36e7
* changes:
  Convert sysprop package to fixtures
  Add preparers for sysprop
2021-03-18 18:17:20 +00:00
Paul Duffin
ebcb37bab1 Merge "Migrate sdk package to a per test build directory" 2021-03-18 17:05:11 +00:00
Paul Duffin
c3f89bece1 Merge "Clean up java package use of python build components" 2021-03-18 17:02:44 +00:00
Paul Duffin
e410711cd5 Merge "Convert python package to fixtures" 2021-03-18 17:02:19 +00:00
Paul Duffin
b72dd403de Merge "Prevent ApexInfoMutator from creating unnecessary variants" 2021-03-18 15:13:39 +00:00
Paul Duffin
b01125f92b Merge changes I9aad3e4e,I150889a0
* changes:
  Convert xml package to fixtures
  Add preparers for xml
2021-03-18 14:16:31 +00:00
Paul Duffin
d5065cfc66 Merge "Add prebuilt_platform_compat_config" 2021-03-18 12:28:00 +00:00
Paul Duffin
1afa515929 Migrate android package to a per test build directory
Bug: 182885307
Test: m nothing
Change-Id: I6b868bacc36be1f6768fbb2fb1d7ed4ad6e4118c
2021-03-18 12:18:09 +00:00
Paul Duffin
c3bdd310bd Convert android/packaging_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: Ic2384bfe3f1edb8d252053fda7df66d49c46fd0f
2021-03-18 12:18:09 +00:00
Paul Duffin
d9ec7d2694 Convert android/ninja_deps_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: Iccba8caffc7e5a82ff13d93a032edcf3f748fc40
2021-03-18 12:18:09 +00:00
Paul Duffin
d518b7e2f2 Convert android/path_properties_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: If75f471885b5e4022b406e267e04b7a20e0be080
2021-03-18 12:18:09 +00:00
Paul Duffin
78c36216a8 Add NinjaDeps to TestResult
Bug: 182885307
Test: m nothing
Change-Id: I1eb49f2514b13f52f367cd8f57e5cb0ab3336bd7
2021-03-18 12:18:09 +00:00
Paul Duffin
a9237b6eeb Convert android/singleton_module_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: Id77575f8ceda43545e2fad97fa1bd6b612c967b4
2021-03-18 12:18:09 +00:00
Paul Duffin
3c6a4ea24a Convert android/neverallow_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: I5679cb517151ceaf468f2fe2e0ccab718cc7b4a3
2021-03-18 12:18:09 +00:00
Paul Duffin
d65970072d Convert android/singleton_module_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: I7f9f3eb66279fe5a2447aefa9b636144c32ce92a
2021-03-18 12:18:05 +00:00
Paul Duffin
4bb2b219d6 Convert android/variable_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: I51d3651244b110bf41cb0e4c331ac663bf816f84
2021-03-18 12:17:05 +00:00
Paul Duffin
791302b412 Convert android/soong_config_modules_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: I53231b820154447e359e48afa47cdf76f0ec6c47
2021-03-18 12:17:05 +00:00
Paul Duffin
e8a4ac49fe Convert android/mutator_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: Id7eb915af21ccde5acf1d4a0ec339e0672bc3d57
2021-03-18 12:17:05 +00:00
Paul Duffin
485079130d Convert android/deptag_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: I837c7b9944a9adbe9019ae8a4e69ff3b7086ca5c
2021-03-18 12:17:01 +00:00
Paul Duffin
4b9bb5c057 Merge "Convert android/namespace_test.go to test fixtures" 2021-03-18 12:14:01 +00:00