summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-03-19 18:02:07 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-20 13:08:14 +0100
commit0f996897455d20958bdad23a1d467f68f1f81b18 (patch)
treeaa6965e72f4871d30edd2a22ecac619b1485cb02
parentcf7aa031e920abc6246f0a876590019efcae639a (diff)
tests/shell: Allow to specify multiple testcases
Extend run-tests.sh a bit so that all remaining arguments after option parsing are treated as filenames to test and complain if one doesn't seem like such. This allows for doing stuff like: | ./run-tests.sh testcases/include/000* Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rwxr-xr-xtests/shell/run-tests.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index 431d5559..b52611b4 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -55,12 +55,14 @@ if [ "$1" == "-g" ] ; then
shift
fi
-if [ -x "$1" ] ; then
- if grep ^.*${RETURNCODE_SEPARATOR}[0-9]\\+$ <<< $1 >/dev/null ; then
- SINGLE=$1
+for arg in "$@"; do
+ if grep ^.*${RETURNCODE_SEPARATOR}[0-9]\\+$ <<< $arg >/dev/null ; then
+ SINGLE+=" $arg"
VERBOSE=y
+ else
+ msg_error "unknown parameter '$arg'"
fi
-fi
+done
kernel_cleanup() {
$NFT flush ruleset