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
This commit is contained in:
parent
bd61eeecd7
commit
c2ba38a7c1
1 changed files with 6 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue