platform_build_soong/apex
Paul Duffin 60264a0b99 Improve realism of boot jar tests
Boot jars, updatable boot jars and art apex jars are part of two
separate but related configuration objects, the main Config struct
(actually the nested productVariables struct) and the dexpreopt
specific GlobalConfig. The fields in both are initialized from the same
data in the make config files but handled separately.

Previously each test that used one of the configuration objects would
generally just initialize the one it used. That would make the test
sensitive to the specific configuration object that was used. A
refactoring that change the code from using one configuration object to
the other would cause the test to fail.

Also, some tests would inadvertently create invalid configurations by
setting ArtApexJars without also setting BootJars. While the ability to
create invalid configurations is useful (and there are some tests that
exist to verify the behavior in that case) most tests should not be
using them.

This change simplifies the configuration of the tests and improves
their realism by:
1. Providing a new FixtureConfigureBootJars method that takes a set of
   boot jars and sets ArtApexJars, and BootJars in the
   dexpreopt.GlobalConfig and BootJars in the product variables too.
2. Providing a new FixtureConfigureUpdatableBootJars method that takes
   a set of boot jars and sets UpdatableBootJars in both the
   dexpreopt.GlobalConfig and productVariables.
3. Migrating existing tests to use these new methods.

Some tests still use the dexpreopt.FixtureSet...Jars() methods directly,
generally to create invalid configurations.

Bug: 177892522
Test: m nothing
Change-Id: I4d8f0b9762cfcc7ae6383bef08563d7c3fa13955
2021-04-13 14:48:34 +01:00
..
Android.bp Add dependencies from platform_bootclasspath to contents 2021-04-08 18:53:04 +01:00
androidmk.go Support paths for init_rc from Soong. 2021-04-07 16:26:55 -04:00
apex.go Shared lib dependencies from rlib are included in APEX 2021-04-08 18:20:39 +09:00
apex_singleton.go Treat allowed_deps.txt source file as optional. 2021-03-18 11:15:33 +00:00
apex_test.go Improve realism of boot jar tests 2021-04-13 14:48:34 +01:00
boot_image_test.go Improve realism of boot jar tests 2021-04-13 14:48:34 +01:00
builder.go Move java.sdkSpec to the android package 2021-04-03 08:25:12 +09:00
deapexer.go Separate apex selection from apex.Prebuilt 2021-04-07 10:11:10 +01:00
key.go Extract apex registration code into function for reuse 2021-03-09 23:03:40 +00:00
OWNERS Move allowed_deps.txt to packages/modules/common. 2021-03-17 13:44:16 +00:00
platform_bootclasspath_test.go Improve realism of boot jar tests 2021-04-13 14:48:34 +01:00
prebuilt.go Add deapexer support for apex_set 2021-04-07 20:39:13 +01:00
TEST_MAPPING Add TEST_MAPPING for build/soong/apex 2019-08-07 17:33:24 +09:00
testing.go Disallow non-existent paths in sdk package 2021-03-25 12:53:22 +00:00
vndk.go Remove global state from VNDK apexes 2021-03-02 12:23:16 -08:00
vndk_test.go Don't use incorrect version names like VER or BOARD even in tests 2021-04-05 09:32:06 +09:00