From 118a4c58725bf3b462bc8190df97620029156e10 Mon Sep 17 00:00:00 2001 From: Valentine Burley Date: Mon, 28 Apr 2025 09:51:05 +0200 Subject: [PATCH] ci/android: Remove redundant android-tools folder Since we no longer download the Android build or platform tools, there's no need for a separate android-tools subfolder. The CTS archive is now extracted directly to /android-cts. Signed-off-by: Valentine Burley Part-of: --- .gitlab-ci/android-cts-runner.sh | 12 ++++++------ .gitlab-ci/container/debian/x86_64_test-android.sh | 9 ++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci/android-cts-runner.sh b/.gitlab-ci/android-cts-runner.sh index 0263bf9cc42..72bfd87040a 100755 --- a/.gitlab-ci/android-cts-runner.sh +++ b/.gitlab-ci/android-cts-runner.sh @@ -4,8 +4,8 @@ . "${SCRIPTS_DIR}/setup-test-env.sh" -export PATH=/android-tools/android-cts/jdk/bin/:$PATH -export JAVA_HOME=/android-tools/android-cts/jdk +export PATH=/android-cts/jdk/bin/:$PATH +export JAVA_HOME=/android-cts/jdk # Wait for the appops service to show up while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done @@ -26,11 +26,11 @@ else fi set +e -eval "/android-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \ +eval "/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \ $INCLUDE_FILTERS \ $EXCLUDE_FILTERS -[ "$(grep "^FAILED" /android-tools/android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ] +[ "$(grep "^FAILED" /android-cts/results/latest/invocation_summary.txt | tr -d ' ' | cut -d ':' -f 2)" = "0" ] # shellcheck disable=SC2034 # EXIT_CODE is used by the script that sources this one EXIT_CODE=$? @@ -38,7 +38,7 @@ set -e section_switch cuttlefish_results "cuttlefish: gathering the results" -cp -r "/android-tools/android-cts/results/latest"/* $RESULTS_DIR -cp -r "/android-tools/android-cts/logs/latest"/* $RESULTS_DIR +cp -r "/android-cts/results/latest"/* $RESULTS_DIR +cp -r "/android-cts/logs/latest"/* $RESULTS_DIR section_end cuttlefish_results diff --git a/.gitlab-ci/container/debian/x86_64_test-android.sh b/.gitlab-ci/container/debian/x86_64_test-android.sh index 43fe6aba10d..d474d32fabe 100755 --- a/.gitlab-ci/container/debian/x86_64_test-android.sh +++ b/.gitlab-ci/container/debian/x86_64_test-android.sh @@ -154,21 +154,16 @@ section_start android-cts "Downloading Android CTS" ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1" ANDROID_CTS_DEVICE_ARCH="x86" -mkdir /android-tools -pushd /android-tools - curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ -o "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" \ "https://dl.google.com/dl/android/cts/android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" -unzip -q "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" +unzip -q -d / "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" rm "android-cts-${ANDROID_CTS_VERSION}-linux_x86-${ANDROID_CTS_DEVICE_ARCH}.zip" # Keep only the interesting tests to save space # shellcheck disable=SC2086 # we want word splitting ANDROID_CTS_MODULES_KEEP_EXPRESSION=$(printf "%s|" $ANDROID_CTS_MODULES | sed -e 's/|$//g') -find android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf - -popd +find /android-cts/testcases/ -mindepth 1 -type d | grep -v -E "$ANDROID_CTS_MODULES_KEEP_EXPRESSION" | xargs rm -rf section_end android-cts