Commit Graph

34610 Commits

Author SHA1 Message Date
Paul Duffin a1063c09f6 Merge changes I94f66e3e,I233a4fe1,Idbb37485
* changes:
  Group all the preparations needed for testing dexpreopt
  Separate methods used for fixture based and legacy tests
  Use more inclusive language in dexpreopt/testing.go
2021-03-24 13:41:56 +00:00
Thiébaud Weksteen 70204f9fc9 Merge "rust: Drop libgcc dependency" 2021-03-24 12:44:09 +00:00
Ulyana Trafimovich 8ef5b4f95f Merge "Split functions for compiling boot jars to allow future code reuse." 2021-03-24 10:48:51 +00:00
Paul Duffin 9fc9f53423 Group all the preparations needed for testing dexpreopt
Make it easier to test dexpreopt functionality by grouping all the
fixture preparations together.

Bug: 177892522
Test: m nothing
Change-Id: I94f66e3ec82efc4fd791f4fdab678d298565e452
2021-03-24 08:30:27 +00:00
Paul Duffin 3c84eaaa98 Separate methods used for fixture based and legacy tests
The fixture mechanism makes it easy to refactor by splitting up an
existing preparer into separate ones and then combining them back
together. Unfortunately, that becomes slightly more tricky when
preparers and legacy tests use the same functions to register build
components and define default modules.

This change splits the RegisterRequiredBuildComponentsForTest and
GatherRequiredDepsForTest methods into two methods each, with the
existing method used for legacy tests and calling the new method that
is used for the preparer.

At the moment all the functionality is in the new methods but over
time, as functionality is extracted into separate preparers, the
functionality can also be moved from the method that is common to both
legacy and fixture based tests into the legacy only method.

Bug: 177892522
Test: m nothing
Change-Id: I233a4fe1fb072a00292acc2bb20821ec82a9bd67
2021-03-24 08:27:04 +00:00
Paul Duffin f8e3d8341a Use more inclusive language in dexpreopt/testing.go
Bug: 177892522
Test: m nothing
Change-Id: Idbb37485a573ddd25c4da48ab88f9c559fca5434
2021-03-24 08:26:48 +00:00
Paul Duffin b6535d329f Merge "Remove javaFixtureFactory" 2021-03-24 08:25:20 +00:00
Paul Duffin 9d33cf237a Merge "Remove unused test methods and buildDir" 2021-03-24 08:23:31 +00:00
Paul Duffin 38e73fcfc0 Merge "Remove uses of buildDir from java/rro_test.go" 2021-03-24 08:22:25 +00:00
Paul Duffin 5916fe6856 Merge "Remove uses of buildDir from java/kotlin_test.go" 2021-03-24 08:00:15 +00:00
Paul Duffin 369c3aae53 Merge "Remove uses of buildDir from java/java_test.go and java/sdk_test.go" 2021-03-24 07:58:43 +00:00
Paul Duffin 700185b1f8 Merge "Remove uses of buildDir from java/app_test.go" 2021-03-24 07:58:28 +00:00
Paul Duffin 86da0448c6 Merge "Remove uses of buildDir from java/app_set_test.go" 2021-03-24 07:58:09 +00:00
Paul Duffin 6567d07f59 Merge "Remove uses of buildDir from java/app_import_test.go" 2021-03-24 07:55:37 +00:00
Paul Duffin 6f59e6a568 Merge "Remove uses of buildDir in java/androidmk_test.go" 2021-03-24 07:54:15 +00:00
Paul Duffin eed60863d0 Merge "Remove uses of buildDir in java/hiddenapi_singleton_test.go" 2021-03-24 07:53:51 +00:00
Paul Duffin 1b095e5177 Merge "Remove uses of buildDir from java/dexpreopt_bootjars_test.go" 2021-03-24 07:52:12 +00:00
Paul Duffin 5863c2ae65 Merge "Register java_plugin in PrepareForTestWithJavaBuildComponents" 2021-03-24 07:51:51 +00:00
Lukács T. Berki 543d4a5156 Merge "Make GENERATE_BAZEL_FILES=true correct." 2021-03-24 07:01:16 +00:00
Inseob Kim eb120bd741 Merge "Add WithDexpreopt soong variable" 2021-03-24 06:20:03 +00:00
Treehugger Robot 7b1debfcbc Merge "Fix genrule depending on disabled module with ALLOW_MISSING_DEPENDENCIES=true" 2021-03-24 03:59:44 +00:00
Kousik Kumar 9008ca3005 Merge "Print the output from RBE bootstrap shutdown" 2021-03-24 02:24:37 +00:00
Paul Duffin 71ae59412b Remove javaFixtureFactory
Replaces uses of javaFixtureFactory with prepareForJavaTest and removes
the unused javaFixtureFactory.

Bug: 182885307
Test: m nothing
Change-Id: I809772d14af2af211b9e15ad676fbdc06b07cd46
2021-03-24 01:07:12 +00:00
Paul Duffin d6339af0b6 Remove unused test methods and buildDir
Bug: 182885307
Test: m nothing
Change-Id: I251145a82479428a82f19cbde6b415d149acd619
2021-03-24 01:07:12 +00:00
Paul Duffin 0342dc9c35 Remove uses of buildDir from java/rro_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: Id0e5710f1f121aec9c5f744a7bc7df82d95484f6
2021-03-24 01:07:12 +00:00
Paul Duffin b148a49319 Remove uses of buildDir from java/kotlin_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: Id1d449d55fe992ebc3d7bad38a76bb1652844f52
2021-03-24 01:07:12 +00:00
Paul Duffin 414ea5eb73 Remove uses of buildDir from java/java_test.go and java/sdk_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: I4d9dc39d3b1e5c37ba1f9e72da94048949c0fd17
2021-03-24 01:07:12 +00:00
Paul Duffin fb0fe9f5cb Remove uses of buildDir from java/app_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: Ia8f835a8250934ef328cad02b272e6b94b13c459
2021-03-24 01:07:02 +00:00
Paul Duffin f71e4ed326 Remove uses of buildDir from java/app_set_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: I64b13dcb310e0a0a2049b5e3b0ea0115e7e9c2f5
2021-03-24 00:01:15 +00:00
Paul Duffin fb8bc95199 Remove uses of buildDir from java/app_import_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: I700a3cafaa427243212aab1eb903d1871327483c
2021-03-24 00:01:15 +00:00
Paul Duffin f04311cbc1 Remove uses of buildDir in java/androidmk_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: Ibb9520d1500fcef9a4348570926a07b5bb54bf8c
2021-03-24 00:01:15 +00:00
Paul Duffin 2f9e71e5ad Remove uses of buildDir in java/hiddenapi_singleton_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: I664465808cd4edf1fef611c07ae05a32683dc976
2021-03-24 00:01:15 +00:00
Paul Duffin 67d485e9d4 Remove uses of buildDir from java/dexpreopt_bootjars_test.go
Remove any uses, either direct (or indirect via testJavaConfig or
similar methods), of the package level buildDir variable from this
file.

Bug: 182885307
Test: m nothing
Change-Id: I852dbb5ad2e1aa58df103679c5e9de14cf64abc3
2021-03-24 00:01:15 +00:00
Paul Duffin c029c43c99 Register java_plugin in PrepareForTestWithJavaBuildComponents
Bug: 182885307
Test: m nothing
Change-Id: I550d39ba46c548b6b099d8dc6a9c458ca931b2fa
2021-03-24 00:01:15 +00:00
Paul Duffin c5993b2c9d Merge "Support test fixtures in rust package" 2021-03-24 00:00:19 +00:00
Colin Cross fa65cee27f Fix genrule depending on disabled module with ALLOW_MISSING_DEPENDENCIES=true
If a genrule depends on a module that is disabled, in this case because
it is a device module in a host-only build, it can cause panics when
getPathsFromModuleDep retrieves a nil Path from the disabled module.
Treat disabled modules as missing dependencies.

Test: TestGenruleAllowMissingDependencies
Change-Id: I3c689c6b5505b21eaf7ae7cb93c00f96f438ac17
2021-03-23 16:17:37 -07:00
Paul Duffin 2c4ca8d73f Support test fixtures in rust package
Replaces the rust specific rustTestCtx mechanism with the general test
fixtures mechanism as converting it to use preparers was not possible.

Also, removes usages of the buildDir variable and removes it as it is
no longer needed.

Bug: 181070625
Test: m nothing
Change-Id: I0176a7b6fb2d390ae23693f1e198da5124b4be63
2021-03-23 18:47:15 +00:00
Treehugger Robot dca349a782 Merge "Handle include_build_directory prop in bp2build" 2021-03-23 14:39:19 +00:00
Lukacs T. Berki f0b3b94bb3 Make GENERATE_BAZEL_FILES=true correct.
This is achieved by writing soong.environment.used in Main() instead of
as a side effect of a singleton. This makes a difference because build
actions are not generated when GENERATE_BAZEL_FILES=true is set,
therefore the side effect did not happen.

Arguably, Main() is made worse by this change, but I don't want to
tackle the problem of readably determining which mode soong_build is
running in in this change.

Test: Presubmits + the additional test.
Change-Id: I66af2429aedf008762173eaaa55b828b4cf4328b
2021-03-23 15:18:22 +01:00
Thiébaud Weksteen f1ff54a10b rust: Drop libgcc dependency
Rustc unstable option "link-native-libraries" is used to prevent the
linkage of other libraries via the #[link] directive. Add a dependency
to libclang_rt.builtins, similarly to cc.

Bug: 141331117
Test: lunch aosp_crosshatch-userdebug; m
Change-Id: I5c232291a5dd08a99e6a12a1295e30bb8e4fcaf1
2021-03-23 13:55:40 +01:00
Inseob Kim 7b85eeb41e Add WithDexpreopt soong variable
Test: m selinux_policy on sc-arc
Change-Id: I9e8ba5746e4648a04fe4d8fbe5d3403ba06b5914
2021-03-23 20:52:24 +09:00
Paul Duffin 7ee6e8fa0f Merge "Add platform_compat_config to sdk" 2021-03-23 11:17:06 +00:00
Paul Duffin e835389123 Merge "Add TestBasicSdkWithBootImage" 2021-03-23 11:13:12 +00:00
Paul Duffin 713b501017 Merge "Register the propagateRROEnforcementMutator" 2021-03-23 10:46:49 +00:00
Treehugger Robot c29088b727 Merge "Remove .rustc ELF section from mini-debug-info." 2021-03-23 09:13:53 +00:00
Paul Duffin e0998ab561 Merge "Add preparer for overlay pre-singleton registration" 2021-03-23 07:21:30 +00:00
Paul Duffin 010bb3c5b3 Merge "Add TestingModule.VariablesForTestsRelativeToTop" 2021-03-23 07:21:01 +00:00
Paul Duffin a327008e65 Merge "Add TestingBuildParams.RelativeToTop()" 2021-03-23 07:20:33 +00:00
Paul Duffin 332310aac4 Merge "Improve searching for TestingBuildParams using the output file" 2021-03-23 07:20:04 +00:00
Paul Duffin b09a2d6af4 Merge "Move helper methods that take testBuildProvider into baseTestingComponent" 2021-03-23 07:19:42 +00:00