diff options
author | 2024-08-13 17:16:33 -0700 | |
---|---|---|
committer | 2024-08-27 11:15:25 -0700 | |
commit | b9c54644a213c36cd175f575545e80f7972bc25a (patch) | |
tree | 09a28c93663e8dbe581af05d3e252cd7f2aeadd2 /ci/Android.bp | |
parent | b2c2fe8856de5a458f2756727bf4aa32268470a4 (diff) |
Implement get_build_targets_impl in GeneralTestsOptimizer
Implement functionality in GeneralTestsOptimizer to find what targets to
build.
This logic is fairly complex and involves checking for test
configs that download general-tests.zip. Then the configs are checked to
see if they're proper test mapping tests (if they use the
'test-mapping-test-group' option). If they are, then TEST_MAPPING
modules are scanned to see if the list of changed files would cause any
test mapping modules to run. The tests are then further filtered by
test-mapping-test-groups used in the test configs.
In case that a test uses general-tests.zip but does not specify
'test-mapping-test-group' then all bets are off and general-tests.zip
is built in its entirety.
package_outputs is still unimplemented so this will need to be
implemented before the optimization can be enabled.
Test: atest build_test_suites_test && atest optimized_targets_test
Bug: 358215235
Change-Id: I6a7eebfd1b06b380799292eb2019ac17c9af5367
Diffstat (limited to 'ci/Android.bp')
-rw-r--r-- | ci/Android.bp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ci/Android.bp b/ci/Android.bp index 22c4851bca..6d4ac35517 100644 --- a/ci/Android.bp +++ b/ci/Android.bp @@ -71,11 +71,36 @@ python_test_host { }, } +python_test_host { + name: "optimized_targets_test", + main: "optimized_targets_test.py", + pkg_path: "testdata", + srcs: [ + "optimized_targets_test.py", + ], + libs: [ + "build_test_suites", + "pyfakefs", + ], + test_options: { + unit_test: true, + }, + data: [ + ":py3-cmd", + ], + version: { + py3: { + embedded_launcher: true, + }, + }, +} + python_library_host { name: "build_test_suites", srcs: [ "build_test_suites.py", "optimized_targets.py", + "test_mapping_module_retriever.py", "build_context.py", ], } |