hs-test: add runtime options

Options
 "-p" to not remove topology elements after the test finishes
 "-v" from now on extra output from tests is hidden by default,
      this will show it again

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I626188561c883534e9004d5130ee2a972d12b4e2
diff --git a/extras/hs-test/test b/extras/hs-test/test
index 0bccc87..cd0a6e1 100755
--- a/extras/hs-test/test
+++ b/extras/hs-test/test
@@ -1,4 +1,18 @@
 #!/usr/bin/env bash
 
 source vars
-sudo -E go test -buildvcs=false  -v $@
+
+for ARG in "$@"
+do
+	if [[ "$ARG" = "-p" ]]
+	then
+		export HST_PERSIST=1
+		shift
+	elif [[ "$ARG" = "-v" ]]
+	then
+		export HST_VERBOSE=1
+		shift
+	fi
+done
+
+sudo -E go test -buildvcs=false -v $@