From 9f0be629cd6a2d9c92db91f50be41929eedbd1f2 Mon Sep 17 00:00:00 2001 From: Cristian Ciocaltea Date: Tue, 4 Jan 2022 23:15:19 +0200 Subject: [PATCH] virgl/ci: Fix identification of dEQP binary paths In some cases the file paths passed to crosvm for execution do not point to dEQP binaries, but can be wrapper scripts, like deqp-runner.sh. Detect such cases and skip changing the working directory. Additionally, use the POSIX compliant command substitution syntax instead of the obsolete variant based on backquotes. Fixes: 81f25d8f276 ("virgl/ci: Run each dEQP instance in its own VM") Signed-off-by: Cristian Ciocaltea Reviewed-by: Rohan Garg Reviewed-by: Tomeu Vizoso Part-of: --- .gitlab-ci/crosvm-runner.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/crosvm-runner.sh b/.gitlab-ci/crosvm-runner.sh index 119a4276a70..2d6c30dc84b 100755 --- a/.gitlab-ci/crosvm-runner.sh +++ b/.gitlab-ci/crosvm-runner.sh @@ -3,11 +3,11 @@ set -ex # This script can be called concurrently, pass arguments and env in a per-instance tmp dir -export DEQP_TEMP_DIR=`mktemp -d /tmp.XXXXXXXXXX` +export DEQP_TEMP_DIR=$(mktemp -d /tmp.XXXXXXXXXX) # The dEQP binary needs to run from the directory it's in -if [ -z "${1##*"deqp"*}" ]; then - PWD=`dirname $1` +if [ -n "${1##*.sh}" ] && [ -z "${1##*"deqp"*}" ]; then + PWD=$(dirname $1) fi export -p > $DEQP_TEMP_DIR/crosvm-env.sh