We also want to run Android CTS in the Android jobs. Since the Android CTS is quite large, download it and strip it down to only contain the interesting tests, so to reduce the space taken in the container image. Eventually we might want to have android-cts be run via deqp-runner itself, but for now add a proof-of-concept mechanism which calls the android-cts directly and uses an ad-hoc handling of expectations. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33499>
45 lines
1.5 KiB
Bash
Executable File
45 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# shellcheck disable=SC2086 # we want word splitting
|
|
# shellcheck disable=SC1091 # paths only become valid at runtime
|
|
|
|
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
|
|
|
export PATH=/android-tools/android-cts/jdk/bin/:/android-tools/build-tools:$PATH
|
|
export JAVA_HOME=/android-tools/android-cts/jdk
|
|
|
|
# Wait for the appops service to show up
|
|
while [ "$($ADB shell dumpsys -l | grep appops)" = "" ] ; do sleep 1; done
|
|
|
|
SKIP_FILE="$INSTALL/${GPU_VERSION}-android-cts-skips.txt"
|
|
|
|
EXCLUDE_FILTERS=""
|
|
if [ -e "$SKIP_FILE" ]; then
|
|
EXCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$SKIP_FILE" | sed -s 's/.*/--exclude-filter "\0" /g')"
|
|
fi
|
|
|
|
INCLUDE_FILE="$INSTALL/${GPU_VERSION}-android-cts-include.txt"
|
|
|
|
if [ -e "$INCLUDE_FILE" ]; then
|
|
INCLUDE_FILTERS="$(grep -v -E "(^#|^[[:space:]]*$)" "$INCLUDE_FILE" | sed -s 's/.*/--include-filter "\0" /g')"
|
|
else
|
|
INCLUDE_FILTERS=$(printf -- "--include-filter %s " $ANDROID_CTS_MODULES | sed -e 's/ $//g')
|
|
fi
|
|
|
|
set +e
|
|
eval "/android-tools/android-cts/tools/cts-tradefed" run commandAndExit cts-dev \
|
|
$EXCLUDE_FILTERS \
|
|
$INCLUDE_FILTERS
|
|
|
|
[ "$(grep "^FAILED" /android-tools/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=$?
|
|
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
|
|
|
|
section_end cuttlefish_results
|