summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/test
diff options
context:
space:
mode:
authorMaros Ondrejicka <mondreji@cisco.com>2023-02-27 16:52:57 +0100
committerFlorin Coras <florin.coras@gmail.com>2023-02-28 16:36:41 +0000
commitaf004ddad1231682d0a64ce9671e2619c2910c7a (patch)
treec0631b738b8f024f5ad12ceddbbce54651ceacca /extras/hs-test/test
parent32881935bb82b009528ba5a930b4399bad26abfd (diff)
hs-test: add option to unconfigure topology
Adding `UNCONFIGURE=true` argument when running `make test` will skip test run and unconfigure existing topology for that test. Type: test Signed-off-by: Maros Ondrejicka <mondreji@cisco.com> Change-Id: I197747a56ca68807f0b2c3f25b6f61c3dcc41ace
Diffstat (limited to 'extras/hs-test/test')
-rwxr-xr-xextras/hs-test/test20
1 files changed, 19 insertions, 1 deletions
diff --git a/extras/hs-test/test b/extras/hs-test/test
index e14f3eecaa6..f02c1596681 100755
--- a/extras/hs-test/test
+++ b/extras/hs-test/test
@@ -5,6 +5,7 @@ source vars
args=
single_test=0
persist_set=0
+unconfigure_set=0
for i in "$@"
do
@@ -22,6 +23,13 @@ case "${i}" in
args="$args -verbose"
fi
;;
+ --unconfigure=*)
+ unconfigure="${i#*=}"
+ if [ $unconfigure = "true" ]; then
+ args="$args -unconfigure"
+ unconfigure_set=1
+ fi
+ ;;
--test=*)
tc_name="${i#*=}"
if [ $tc_name != "all" ]; then
@@ -32,7 +40,17 @@ esac
done
if [ $single_test -eq 0 ] && [ $persist_set -eq 1 ]; then
- echo "persist flag is not supperted while running all tests!"
+ echo "persist flag is not supported while running all tests!"
+ exit 1
+fi
+
+if [ $unconfigure_set -eq 1 ] && [ $single_test -eq 0 ]; then
+ echo "a single test has to be specified when unconfigure is set"
+ exit 1
+fi
+
+if [ $persist_set -eq 1 ] && [ $unconfigure_set -eq 1 ]; then
+ echo "setting persist flag and unconfigure flag is not allowed"
exit 1
fi