diff --git a/.gitlab-ci/android-cts-runner.sh b/.gitlab-ci/android-cts-runner.sh index cad7f5b636c..52fa1624ef4 100755 --- a/.gitlab-ci/android-cts-runner.sh +++ b/.gitlab-ci/android-cts-runner.sh @@ -21,12 +21,16 @@ fi INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt" -if [ -e "$INCLUDE_FILE" ]; then - INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -e 's/\s*$//g' -e 's/.*/--include-filter "\0" /g')" -else - INCLUDE_FILTERS=$(printf -- "--include-filter %s " $ANDROID_CTS_MODULES | sed -e 's/ $//g') +if [ ! -e "$INCLUDE_FILE" ]; then + set +x + echo "ERROR: No include file (${GPU_VERSION}-android-cts-include.txt) found." + echo "This means that we are running the all available CTS modules." + echo "But the time to run it might be too long, please provide an include file instead." + exit 1 fi +INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -e 's/\s*$//g' -e 's/.*/--include-filter "\0" /g')" + set +e eval "/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \ $INCLUDE_FILTERS \ @@ -38,10 +42,12 @@ SUMMARY_FILE=/android-cts/results/latest/invocation_summary.txt COMPLETED_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\1/p' "$SUMMARY_FILE") AVAILABLE_MODULES=$(sed -n -e '/modules completed/s/^\([0-9]\+\)\/\([0-9]\+\) .*$/\2/p' "$SUMMARY_FILE") [ "$COMPLETED_MODULES" = "$AVAILABLE_MODULES" ] +# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195 MODULES_FAILED=$? # Parse a line like `FAILED : x` to check that no tests failed [ "$(grep "^FAILED" "$SUMMARY_FILE" | tr -d ' ' | cut -d ':' -f 2)" = "0" ] +# shellcheck disable=SC2319 # False-positive see https://github.com/koalaman/shellcheck/issues/2937#issuecomment-2660891195 TESTS_FAILED=$? [ "$MODULES_FAILED" = "0" ] && [ "$TESTS_FAILED" = "0" ] diff --git a/.gitlab-ci/conditional-build-image-tags.yml b/.gitlab-ci/conditional-build-image-tags.yml index 56b2816c48f..706af230dc2 100644 --- a/.gitlab-ci/conditional-build-image-tags.yml +++ b/.gitlab-ci/conditional-build-image-tags.yml @@ -1,5 +1,5 @@ variables: - CONDITIONAL_BUILD_ANDROID_CTS_TAG: 7dc065d0dbc5af2614ac81d805e5a15f + CONDITIONAL_BUILD_ANDROID_CTS_TAG: ac6224b62687b8dd529d91c1a013094b CONDITIONAL_BUILD_ANGLE_TAG: f62910e55be46e37cc867d037e4a8121 CONDITIONAL_BUILD_CROSVM_TAG: 0f59350b1052bdbb28b65a832b494377 CONDITIONAL_BUILD_FLUSTER_TAG: 3bc3afd7468e106afcbfd569a85f34f9 diff --git a/.gitlab-ci/container/build-android-cts.sh b/.gitlab-ci/container/build-android-cts.sh index 111520420ee..da6f72803e9 100644 --- a/.gitlab-ci/container/build-android-cts.sh +++ b/.gitlab-ci/container/build-android-cts.sh @@ -22,6 +22,15 @@ set -x # setting up the environment variables locally ci_tag_build_time_check "ANDROID_CTS_TAG" +# List of all CTS modules we might want to run in CI +# This should be the union of all modules required by our CI jobs +# Specific modules to run are selected via the ${GPU_VERSION}-android-cts-include.txt files +ANDROID_CTS_MODULES=( + "CtsGraphicsTestCases" + "CtsNativeHardwareTestCases" + "CtsSkQPTestCases" +) + ANDROID_CTS_VERSION="${ANDROID_VERSION}_r1" ANDROID_CTS_DEVICE_ARCH="x86" @@ -44,7 +53,7 @@ else # 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') + 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 # Using zstd compressed tarball instead of zip, the compression ratio is almost the same, but diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml index 6dd3a83b2fb..4965ba14dcf 100644 --- a/.gitlab-ci/container/gitlab-ci.yml +++ b/.gitlab-ci/container/gitlab-ci.yml @@ -255,11 +255,6 @@ debian/s390x_build: ANDROID_VERSION: 14 ANDROID_NDK_VERSION: "r27c" ANDROID_SDK_VERSION: 34 - # Space-separated list of interesting CTS modules - ANDROID_CTS_MODULES: >- - CtsGraphicsTestCases - CtsNativeHardwareTestCases - CtsSkQPTestCases ANDROID_LLVM_VERSION: llvmorg-19.1.7 ANDROID_LLVM_ARTIFACT_NAME: android-x86_64-llvm-20250324 # This can be confusing: LLVM_VERSION refers to the host LLVM toolchain diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index 59a3aa34c74..4f9360cf68e 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -23,7 +23,7 @@ variables: DEBIAN_BUILD_TAG: "20250611-rust" - DEBIAN_TEST_ANDROID_TAG: "20250624-build-tools" + DEBIAN_TEST_ANDROID_TAG: "20250626-cts-mod" DEBIAN_TEST_GL_TAG: "20250616-vkcts-main" DEBIAN_TEST_VIDEO_TAG: "20250609-helper" DEBIAN_TEST_VK_TAG: "20250619-vkd3d" diff --git a/src/virtio/ci/android-angle-venus-anv-android-cts-include.txt b/src/virtio/ci/android-angle-venus-anv-android-cts-include.txt new file mode 100644 index 00000000000..e4decd7adf1 --- /dev/null +++ b/src/virtio/ci/android-angle-venus-anv-android-cts-include.txt @@ -0,0 +1,3 @@ +x86_64 CtsGraphicsTestCases +x86_64 CtsNativeHardwareTestCases +x86_64 CtsSkQPTestCases