2021-12-30 20:55:33 +00:00
|
|
|
#!/bin/sh
|
2022-07-16 15:40:04 +01:00
|
|
|
# shellcheck disable=SC2086 # we want word splitting
|
2020-10-29 17:29:28 +00:00
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
2021-12-30 20:55:33 +00:00
|
|
|
if [ -n "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
|
|
|
# Build and install from source
|
2022-02-21 14:30:13 +00:00
|
|
|
DEQP_RUNNER_CARGO_ARGS="--git ${DEQP_RUNNER_GIT_URL:-https://gitlab.freedesktop.org/anholt/deqp-runner.git}"
|
2021-12-30 20:55:33 +00:00
|
|
|
|
|
|
|
if [ -n "${DEQP_RUNNER_GIT_TAG}" ]; then
|
2022-02-21 14:30:13 +00:00
|
|
|
DEQP_RUNNER_CARGO_ARGS="--tag ${DEQP_RUNNER_GIT_TAG} ${DEQP_RUNNER_CARGO_ARGS}"
|
2021-12-30 20:55:33 +00:00
|
|
|
else
|
2022-02-21 14:30:13 +00:00
|
|
|
DEQP_RUNNER_CARGO_ARGS="--rev ${DEQP_RUNNER_GIT_REV} ${DEQP_RUNNER_CARGO_ARGS}"
|
2021-12-30 20:55:33 +00:00
|
|
|
fi
|
2022-02-21 14:30:13 +00:00
|
|
|
|
|
|
|
DEQP_RUNNER_CARGO_ARGS="${DEQP_RUNNER_CARGO_ARGS} ${EXTRA_CARGO_ARGS}"
|
2021-12-30 20:55:33 +00:00
|
|
|
else
|
|
|
|
# Install from package registry
|
2022-08-26 12:46:01 +01:00
|
|
|
DEQP_RUNNER_CARGO_ARGS="--version 0.16.0 ${EXTRA_CARGO_ARGS} -- deqp-runner"
|
2021-12-30 20:55:33 +00:00
|
|
|
fi
|
|
|
|
|
2022-11-21 17:27:33 +00:00
|
|
|
if [ -z "$ANDROID_NDK_HOME" ]; then
|
|
|
|
cargo install --locked \
|
|
|
|
-j ${FDO_CI_CONCURRENT:-4} \
|
|
|
|
--root /usr/local \
|
|
|
|
${DEQP_RUNNER_CARGO_ARGS}
|
|
|
|
else
|
|
|
|
mkdir -p /deqp-runner
|
|
|
|
pushd /deqp-runner
|
|
|
|
git clone --branch v0.16.1 --depth 1 https://gitlab.freedesktop.org/anholt/deqp-runner.git deqp-runner-git
|
|
|
|
pushd deqp-runner-git
|
|
|
|
|
|
|
|
cargo install --locked \
|
|
|
|
-j ${FDO_CI_CONCURRENT:-4} \
|
|
|
|
--root /usr/local --version 2.10.0 \
|
|
|
|
cargo-ndk
|
|
|
|
|
|
|
|
rustup target add x86_64-linux-android
|
|
|
|
RUSTFLAGS='-C target-feature=+crt-static' cargo ndk --target x86_64-linux-android build
|
|
|
|
|
|
|
|
mv target/x86_64-linux-android/debug/deqp-runner /deqp-runner
|
|
|
|
|
|
|
|
cargo uninstall --locked \
|
|
|
|
--root /usr/local \
|
|
|
|
cargo-ndk
|
|
|
|
|
|
|
|
popd
|
|
|
|
rm -rf deqp-runner-git
|
|
|
|
popd
|
|
|
|
fi
|
2022-08-03 21:58:00 +01:00
|
|
|
|
|
|
|
# remove unused test runners to shrink images for the Mesa CI build (not kernel,
|
|
|
|
# which chooses its own deqp branch)
|
|
|
|
if [ -z "${DEQP_RUNNER_GIT_TAG}${DEQP_RUNNER_GIT_REV}" ]; then
|
|
|
|
rm -f /usr/local/bin/igt-runner
|
|
|
|
fi
|