summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/hs_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/hs_test.sh')
-rw-r--r--extras/hs-test/hs_test.sh27
1 files changed, 15 insertions, 12 deletions
diff --git a/extras/hs-test/hs_test.sh b/extras/hs-test/hs_test.sh
index 85c0dd72705..b935f5d876b 100644
--- a/extras/hs-test/hs_test.sh
+++ b/extras/hs-test/hs_test.sh
@@ -3,14 +3,14 @@
source vars
args=
-single_test=0
+focused_test=0
persist_set=0
unconfigure_set=0
debug_set=0
leak_check_set=0
debug_build=
ginkgo_args=
-tc_name=
+tc_names=()
for i in "$@"
do
@@ -55,13 +55,12 @@ case "${i}" in
args="$args -vppsrc ${i#*=}"
;;
--test=*)
- tc_name="${i#*=}"
- if [ "$tc_name" != "all" ]; then
- single_test=1
- ginkgo_args="$ginkgo_args --focus $tc_name -vv"
+ tc_list="${i#*=}"
+ ginkgo_args="$ginkgo_args -v"
+ if [ "$tc_list" != "all" ]; then
+ focused_test=1
+ IFS=',' read -r -a tc_names <<< "$tc_list"
args="$args -verbose"
- else
- ginkgo_args="$ginkgo_args -v"
fi
;;
--parallel=*)
@@ -86,12 +85,16 @@ case "${i}" in
esac
done
-if [ $single_test -eq 0 ] && [ $persist_set -eq 1 ]; then
+for name in "${tc_names[@]}"; do
+ ginkgo_args="$ginkgo_args --focus $name"
+done
+
+if [ $focused_test -eq 0 ] && [ $persist_set -eq 1 ]; then
echo "persist flag is not supported while running all tests!"
exit 1
fi
-if [ $unconfigure_set -eq 1 ] && [ $single_test -eq 0 ]; then
+if [ $unconfigure_set -eq 1 ] && [ $focused_test -eq 0 ]; then
echo "a single test has to be specified when unconfigure is set"
exit 1
fi
@@ -101,13 +104,13 @@ if [ $persist_set -eq 1 ] && [ $unconfigure_set -eq 1 ]; then
exit 1
fi
-if [ $single_test -eq 0 ] && [ $debug_set -eq 1 ]; then
+if [ $focused_test -eq 0 ] && [ $debug_set -eq 1 ]; then
echo "VPP debug flag is not supported while running all tests!"
exit 1
fi
if [ $leak_check_set -eq 1 ]; then
- if [ $single_test -eq 0 ]; then
+ if [ $focused_test -eq 0 ]; then
echo "a single test has to be specified when leak_check is set"
exit 1
fi