Add a BuildContext class to simplify parsing the build context dict, and
fix the parsing of enabledBuildFeatures, which was being parsed as a
list of strings when it's actually a list of dicts like:
[{'name': '<feature_name>'}]
Test: atest build_test_suites_test
Bug: 361605425
Change-Id: I6424c444daf1582e92313c39f43207cb274aa78f
The current artifact matching logic will cause any test target that uses
something like .*-tests.zip to be way too broad in what it causes to
build. Change the logic to look for the target name in the artifact
matching regex to make it so that only tests that look for a specific
target to match.
Test: atest build_test_suites_test
Bug: 348489774
Change-Id: Ia75e38b676607f45f2b1c8fcf948045c248f1729
Add functionality in build_test_suites.py to not build targets if
their outputs are not used in the test configurations saved in the build
context. If none of the tests reference the targets' outputs they will
not be built at all.
Note that the corresponding flags will need to be enabled for these
optimizations to take place.
Test: atest optimized_targets_test
Bug: 348489774
Change-Id: I8f0ac90e75552ae80073f13229b026c7f23476a6
Set up logging properly in build_test_suites.py so that the log file is
directed to the dist dir (and /tmp if it is not defined)
Test: atest build_test_suites_test
Bug: 355074139
Change-Id: I16ce644f1c717179377c8ca68c74d9af5f2e61df
Ensure that output and errors from the underlying build command are
streamed for real-time build progress updates and debugging.
This change strips out all code that is currently unecessary and adds
tests for the remaining functionality.
Test: atest --host build_test_suites_local_test build_test_suites_test
Bug: 330365727
Change-Id: I7ef98d6654fe1435cf67c15e2c516a0967e03a75
the dist dir should not be passed in as an argument, it should be picked
up from the environment.
Test: ./build/make/ci/build_test_suites --target_product aosp_x86_64 --target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only
Bug: 314171817
Change-Id: I32c007677cf1d81bb7b263b5c69e5510bf8dccfe
Due to branch constraints, remove the extra targets defined inside the
build script and revert to having them be passed in via command line.
Test: ./build/make/ci/build_test_suites_x86_64-trunk_staging --target_product aosp_x86_64 --target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only <extra_targets>
Bug: 314171817
Change-Id: I89a82e969d294104f587d778ad319a41905320f8
In preparation of switching over the git_main test suites target to
using this script change it to a no-op first to insure there's no
initial impact.
Test: ./build/make/ci/build_test_suites-trunk_staging --target_product aosp_x86_64 --target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only
Bug: 314171817
Change-Id: I7afab933143e4b617866b1975b1cbc71107f5b2f
Build general-tests_configs.zip and general-testlist.zip as part of the
build_test_suites step, which general-tests also outputs.
Test: BUILD_NUMBER="P0" ./build/make/ci/build_test_suites --target_product aosp_x86_64
--target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only --dist_dir <dist_dir> --change_info <change_info_file> <extra_targets>
Bug: 314171817
Change-Id: Ic324ed4e5a05e1308dee3af7f15c067f88018b2d
The current logic to determine if a build is pre or postsubmit is the
existence of the change_info file but this file also exists in
postsubmit, causing the build to break. Use the build ID as the
heuristic instead which should be more reliable.
Test: abtd run
Bug: 314171817
Change-Id: I9871eee71c0574583b528135dadd42e3f485a780
Two fixes:
soong dumpvars commands require TARGET_RELEASE to be set in the env, so
set that.
Added option to print command output which is useful for actually
logging build output not only in the case of command failures.
Test: ABTD run with this change
Bug: 314171817
Change-Id: Ia3ad8ebfa58959c13417abaeeaa42a354c4c61de
Move the test build command to a script that lives in-source and
intended to be called by the Android CI build system.
This script optimizes the build when change information is available by
only building relevant test modules. More specifically, only 'affected'
test modules listed in Test Mapping configuration files are built.
Using this script is expected to reduce build times and generate a
smaller `general-tests.zip` file which had increased to over 30 GB.
Test: ./build/make/ci/build_test_suites --target_product aosp_x86_64
--target_release trunk_staging --with_dexpreopt_boot_img_and_system_server_only --dist_dir <dist_dir> --change_info <change_info_file> <extra_targets>
Bug: 314171817
Change-Id: Ie2f8c066f5dd1cd13454141e55956328303fd79d