mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
ci/android: Make android-runner scripts safe for set -u
Also make having VK_DRIVER set mandatory for Cuttlefish. Signed-off-by: Valentine Burley <valentine.burley@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35277>
This commit is contained in:
parent
a6de893b60
commit
5b60cae2af
3 changed files with 9 additions and 4 deletions
|
|
@ -35,6 +35,7 @@ fi
|
||||||
# Default to an empty known flakes file if it doesn't exist.
|
# Default to an empty known flakes file if it doesn't exist.
|
||||||
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
|
$ADB shell "touch /data/deqp/$GPU_VERSION-flakes.txt"
|
||||||
|
|
||||||
|
DEQP_SKIPS=""
|
||||||
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
if [ -e "$INSTALL/$GPU_VERSION-skips.txt" ]; then
|
||||||
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
|
DEQP_SKIPS="$DEQP_SKIPS /data/deqp/$GPU_VERSION-skips.txt"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
# shellcheck disable=SC2086 # we want word splitting
|
||||||
# shellcheck disable=SC1091 # paths only become valid at runtime
|
# shellcheck disable=SC1091 # paths only become valid at runtime
|
||||||
|
|
||||||
|
set -uex
|
||||||
|
|
||||||
# Set default ADB command if not set already
|
# Set default ADB command if not set already
|
||||||
|
|
||||||
: "${ADB:=adb}"
|
: "${ADB:=adb}"
|
||||||
|
|
@ -119,7 +121,7 @@ if ! printf "%s" "$VK_RUNTIME_VERSION" | grep -Fq -- "${MESA_BUILD_VERSION}"; th
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$USE_ANDROID_CTS" ]; then
|
if [ -n "${USE_ANDROID_CTS:-}" ]; then
|
||||||
# The script sets EXIT_CODE
|
# The script sets EXIT_CODE
|
||||||
. "$(dirname "$0")/android-cts-runner.sh"
|
. "$(dirname "$0")/android-cts-runner.sh"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
# shellcheck disable=SC2086 # we want word splitting
|
# shellcheck disable=SC2086 # we want word splitting
|
||||||
# shellcheck disable=SC1091 # paths only become valid at runtime
|
# shellcheck disable=SC1091 # paths only become valid at runtime
|
||||||
|
|
||||||
|
set -uex
|
||||||
|
|
||||||
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
. "${SCRIPTS_DIR}/setup-test-env.sh"
|
||||||
|
|
||||||
section_start cuttlefish_setup "cuttlefish: setup"
|
section_start cuttlefish_setup "cuttlefish: setup"
|
||||||
set -xe
|
|
||||||
|
|
||||||
# Structured tagging check for angle
|
# Structured tagging check for angle
|
||||||
if [ -n "$ANGLE_TAG" ]; then
|
if [ -n "$ANGLE_TAG" ]; then
|
||||||
|
|
@ -14,11 +15,11 @@ if [ -n "$ANGLE_TAG" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PATH=/cuttlefish/bin:$PATH
|
export PATH=/cuttlefish/bin:$PATH
|
||||||
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=/cuttlefish/lib64:${CI_PROJECT_DIR}/install/lib:${LD_LIBRARY_PATH:-}
|
||||||
|
|
||||||
# Pick up a vulkan driver
|
# Pick up a vulkan driver
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER:-}_icd.$ARCH.json
|
export VK_DRIVER_FILES=${CI_PROJECT_DIR}/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$ARCH.json
|
||||||
|
|
||||||
syslogd
|
syslogd
|
||||||
|
|
||||||
|
|
@ -50,6 +51,7 @@ VSOCK_BASE=10000 # greater than all the default vsock ports
|
||||||
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
|
VSOCK_CID=$((VSOCK_BASE + (CI_JOB_ID & 0xfff)))
|
||||||
|
|
||||||
# Venus requires a custom kernel for now
|
# Venus requires a custom kernel for now
|
||||||
|
CUSTOM_KERNEL_ARGS=""
|
||||||
if [ "$ANDROID_GPU_MODE" = "venus" ] || [ "$ANDROID_GPU_MODE" = "venus_guest_angle" ]; then
|
if [ "$ANDROID_GPU_MODE" = "venus" ] || [ "$ANDROID_GPU_MODE" = "venus_guest_angle" ]; then
|
||||||
CUSTOM_KERNEL_ARGS="
|
CUSTOM_KERNEL_ARGS="
|
||||||
-kernel_path=/cuttlefish/bzImage
|
-kernel_path=/cuttlefish/bzImage
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue