From b178c4c900dff8d58588491b3b441b837f7350f5 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Wed, 21 Jun 2023 15:18:47 +0900 Subject: [PATCH] STT: Remove some dist artifacts from test build They consume much disk space even though they are not used. Bug: 284915566 Test: combined_build_test.sh -t cf_x86_64_phone -v userdebug \ -d out/dist -a cf_x86_64_foldable -o -c droid Change-Id: I4fd5e9326e5c77c28c5e178f63ba396c9e462cbd --- treble/combined_build_test.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/treble/combined_build_test.sh b/treble/combined_build_test.sh index a6133cd8b..343b759b8 100755 --- a/treble/combined_build_test.sh +++ b/treble/combined_build_test.sh @@ -128,13 +128,30 @@ if [[ -n "${alter_target}" ]]; then # Building two targets with a single artifacts echo "Installclean for the alternative target..." run_command "${base_command} TARGET_PRODUCT=${alter_target} TARGET_BUILD_VARIANT=${variant} installclean" + if [[ -n "${dist_dir}" ]]; then + # Remove target-specific dist artifacts from the previous build + run_command "rm -f ${dist_dir}/${target}*" + fi echo "Build the alternative target..." run_command "${base_command} TARGET_PRODUCT=${alter_target} TARGET_BUILD_VARIANT=${variant} ${goals}" get_build_trace "build_${alter_target}_ab.trace.gz" echo "Installclean for the primary target..." run_command "${base_command} TARGET_PRODUCT=${target} TARGET_BUILD_VARIANT=${variant} installclean" + if [[ -n "${dist_dir}" ]]; then + # Remove target-specific dist artifacts from the previous build + run_command "rm -f ${dist_dir}/${alter_target}*" + fi echo "Build the primary target again..." run_command "${base_command} TARGET_PRODUCT=${target} TARGET_BUILD_VARIANT=${variant} ${goals}" get_build_trace "build_${target}_aba.trace.gz" fi + +if [[ -n "${dist_dir}" ]]; then + # Remove some dist artifacts to save disk space + run_command "rm -f ${dist_dir}/${target}*" + run_command "rm -f ${dist_dir}/device-tests*" + run_command "rm -f ${dist_dir}/cvd-host_package.tar.gz" + run_command "rm -f ${dist_dir}/dexpreopt_tools.zip" + run_command "rm -f ${dist_dir}/otatools.zip" +fi