aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Farsi <lucafarsi@google.com>2024-03-21 15:38:02 -0700
committerLuca Farsi <lucafarsi@google.com>2024-03-27 11:31:12 -0700
commitc2ba38a7c1ab96bf4da5a75edf50fee5b2167791 (patch)
treee81a201b117c4f230ae8edf9c8cf37d43f79aabe
parentbd61eeecd75ec69bd3c60924f61028db73742c3b (diff)
downloadbuild-c2ba38a7c1ab96bf4da5a75edf50fee5b2167791.tar.gz
switch to using DIST_DIR env var for dist
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
-rw-r--r--ci/build_test_suites.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/ci/build_test_suites.py b/ci/build_test_suites.py
index 23e896d70a..1d5b3774d9 100644
--- a/ci/build_test_suites.py
+++ b/ci/build_test_suites.py
@@ -57,7 +57,6 @@ def parse_args(argv):
argparser.add_argument(
'--with_dexpreopt_boot_img_and_system_server_only', action='store_true'
)
- argparser.add_argument('--dist_dir')
argparser.add_argument('--change_info', nargs='?')
return argparser.parse_args()
@@ -92,16 +91,17 @@ def build_affected_modules(args: argparse.Namespace):
run_command(build_command, print_output=True)
- zip_build_outputs(modules_to_build, args.dist_dir, args.target_release)
+ zip_build_outputs(modules_to_build, args.target_release)
-def base_build_command(args: argparse.Namespace, extra_targets: set[str]) -> list:
+def base_build_command(
+ args: argparse.Namespace, extra_targets: set[str]
+) -> list:
build_command = []
build_command.append('time')
build_command.append('./build/soong/soong_ui.bash')
build_command.append('--make-mode')
build_command.append('dist')
- build_command.append('DIST_DIR=' + args.dist_dir)
build_command.append('TARGET_PRODUCT=' + args.target_product)
build_command.append('TARGET_RELEASE=' + args.target_release)
if args.with_dexpreopt_boot_img_and_system_server_only:
@@ -220,7 +220,7 @@ def matches_file_patterns(
def zip_build_outputs(
- modules_to_build: set[str], dist_dir: str, target_release: str
+ modules_to_build: set[str], target_release: str
):
src_top = os.environ.get('TOP', os.getcwd())
@@ -236,6 +236,7 @@ def zip_build_outputs(
product_out = pathlib.Path(get_soong_var('PRODUCT_OUT', target_release))
soong_host_out = pathlib.Path(get_soong_var('SOONG_HOST_OUT', target_release))
host_out = pathlib.Path(get_soong_var('HOST_OUT', target_release))
+ dist_dir = pathlib.Path(get_soong_var('DIST_DIR', target_release))
# Call the class to package the outputs.
# TODO(lucafarsi): Move this code into a replaceable class.