@@ -21,6 +21,7 @@ Usage: $0 [-h] [-v] [-a] [-g group] [-j NUM-TASKS]
-a: Run all tests, including those flagged as 'nodefault'
and those guarded by errata.
-g: Only execute tests in the given group
+ -t: Only execute the given test
-j: Execute tests in parallel
Set the environment variable QEMU=/path/to/qemu-system-ARCH to
@@ -32,7 +33,7 @@ EOF
RUNTIME_arch_run="./$TEST_DIR/run"
source scripts/runtime.bash
-while getopts "ag:hj:v" opt; do
+while getopts "ag:t:hj:v" opt; do
case $opt in
a)
run_all_tests="yes"
@@ -41,6 +42,9 @@ while getopts "ag:hj:v" opt; do
g)
only_group=$OPTARG
;;
+ t)
+ only_test=$OPTARG
+ ;;
h)
usage
exit
@@ -65,9 +65,9 @@ function run()
if [ -z "$testname" ]; then
return
- fi
-
- if [ -n "$only_group" ] && ! grep -qw "$only_group" <<<$groups; then
+ elif [ -n "$only_test" ] && [ "$only_test" != "$testname" ]; then
+ return
+ elif [ -n "$only_group" ] && ! grep -qw "$only_group" <<<$groups; then
return
fi
x86's nested-VMX test space is massive, to the point where the group option, "-g", does not provide sufficient granularity, e.g. a user may want to run the core VMX tests but not the VMCS shadow tests, which take an absurdly long time to run due to exhuastively testing all VMCS field values. Note that x86's config is currently a bit of a train wreck as far as VMX is concerned; the "-t" option is of limited value until the config is revamped. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- run_tests.sh | 6 +++++- scripts/runtime.bash | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-)