summaryrefslogtreecommitdiff
path: root/testdata/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/common.sh')
-rw-r--r--testdata/common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/testdata/common.sh b/testdata/common.sh
index 280f5dac4cec..a449f1a64eb2 100644
--- a/testdata/common.sh
+++ b/testdata/common.sh
@@ -27,6 +27,7 @@
# wait_petal_up : wait for petal to come up.
# wait_nsd_up : wait for nsd to come up.
# wait_server_up_or_fail: wait for server to come up or print a failure string
+# skip_test x : print message and skip test (must be called in .pre)
# kill_pid : kill a server, make sure and wait for it to go down.
@@ -109,6 +110,13 @@ skip_if_in_list () {
fi
}
+# Print a message and skip the test. Must be called in the .pre file.
+# $1: message to print.
+skip_test () {
+ echo "$1"
+ exit 3
+}
+
# function to get a number of random port numbers.
# $1: number of random ports.
# RND_PORT is returned as the starting port number