aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2020-04-04 17:47:39 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-04-07 11:36:38 -0400
commita61dedddc1473c119bb8ece9e43071a0909dab66 (patch)
tree3db4f9ce53547471a8cd951dd0ede8277a727c3a
parent394d1421fd043e13b3dcd097133bd4eced2ad563 (diff)
downloadkvm-unit-tests-a61dedddc1473c119bb8ece9e43071a0909dab66.tar.gz
runtime: Always honor the unittests.cfg accel requirement
If the unittests.cfg file specifies an accel parameter then don't let the user override it. Signed-off-by: Andrew Jones <drjones@redhat.com> Message-Id: <20200404154739.217584-3-drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--scripts/runtime.bash9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index eb60890..8bfe31c 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -77,7 +77,7 @@ function run()
local opts="$5"
local arch="$6"
local check="${CHECK:-$7}"
- local accel="${ACCEL:-$8}"
+ local accel="$8"
local timeout="${9:-$TIMEOUT}" # unittests.cfg overrides the default
if [ -z "$testname" ]; then
@@ -103,6 +103,13 @@ function run()
return 2
fi
+ if [ -n "$accel" ] && [ -n "$ACCEL" ] && [ "$accel" != "$ACCEL" ]; then
+ print_result "SKIP" $testname "" "$accel only, but ACCEL=$ACCEL"
+ return 2
+ elif [ -n "$ACCEL" ]; then
+ accel="$ACCEL"
+ fi
+
# check a file for a particular value before running a test
# the check line can contain multiple files to check separated by a space
# but each check parameter needs to be of the form <path>=<value>