summaryrefslogtreecommitdiff
path: root/testdata/common.sh
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-10-16 19:24:20 +0000
committerCy Schubert <cy@FreeBSD.org>2022-10-16 19:24:20 +0000
commit643f9a0581e8aac7eb790ced1164748939829826 (patch)
tree426d366252d838c8c61b439342ab32eccd181425 /testdata/common.sh
parent0dde6f4f8e604df8c6fbdab8b4aadb5ddf80c76f (diff)
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