tests: Support filtering integration tests

e.g.

scripts/dev_cli.sh tests --integration -- --test-filter test_watchdog

This used to be supported by passing "$@" but was broken when multiple
hypervisor support was added.

Fixes: #2182

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-01-25 15:55:34 +00:00
parent fd9972ecc5
commit c2acea5156
5 changed files with 13 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash
hypervisor="kvm"
test_filter=""
cmd_help() {
echo ""
echo "Cloud Hypervisor $(basename $0)"
@@ -8,6 +10,7 @@ cmd_help() {
echo "Available arguments:"
echo ""
echo " --hypervisor Underlying hypervisor. Options kvm, mshv"
echo " --test-filter Tests to run"
echo ""
echo " --help Display this help message."
echo ""
@@ -21,8 +24,11 @@ process_common_args() {
shift
hypervisor="$1"
;;
"--test-filter")
shift
test_filter="$1"
;;
*)
# We only care about hypervisor , do nothing for other arguments
;;
esac
shift
@@ -31,4 +37,4 @@ process_common_args() {
echo "Hypervisor value must be kvm"
exit 1
fi
}
}