summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-01-04 16:25:41 +0100
committerFlorian Westphal <fw@strlen.de>2019-01-04 16:25:41 +0100
commit70065ab63a90787c49f714c6e39fa1b112b5c8af (patch)
tree6ae238e9982cb77d194153050baaffa503bb9bcb /tests
parentcbf3e1a25c6cf56eb55bbe6ce0eecbf411c3fb8d (diff)
tests: shell: remove RETURNCODE_SEPARATOR
test files are located via find + a pattern search that looks for _[0-9]. Previous change makes all test scripts return 0 when the test case is supposed to pass, so the foo_$retval name is no longer needed. Update script to look for all executeables in the 'testcases' directory. This makes it necessary to make two dump-files non-executeable. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/run-tests.sh14
-rw-r--r--[-rwxr-xr-x]tests/shell/testcases/flowtable/dumps/0001flowtable_0.nft0
-rw-r--r--[-rwxr-xr-x]tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft0
3 files changed, 4 insertions, 10 deletions
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index 6b693cc1..81ee0cdd 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -1,8 +1,7 @@
#!/bin/bash
# Configuration
-TESTDIR="./$(dirname $0)/"
-RETURNCODE_SEPARATOR="_"
+TESTDIR="./$(dirname $0)/testcases"
SRC_NFT="$(dirname $0)/../../src/nft"
DIFF=$(which diff)
@@ -55,12 +54,8 @@ if [ "$1" == "-g" ] ; then
fi
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
+ SINGLE+=" $arg"
+ VERBOSE=y
done
kernel_cleanup() {
@@ -90,8 +85,7 @@ find_tests() {
echo $SINGLE
return
fi
- ${FIND} ${TESTDIR} -executable -regex \
- .*${RETURNCODE_SEPARATOR}[0-9]+ | sort
+ ${FIND} ${TESTDIR} -type f -executable | sort
}
echo ""
diff --git a/tests/shell/testcases/flowtable/dumps/0001flowtable_0.nft b/tests/shell/testcases/flowtable/dumps/0001flowtable_0.nft
index 6a1c7b81..6a1c7b81 100755..100644
--- a/tests/shell/testcases/flowtable/dumps/0001flowtable_0.nft
+++ b/tests/shell/testcases/flowtable/dumps/0001flowtable_0.nft
diff --git a/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft b/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft
index bca36580..bca36580 100755..100644
--- a/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft
+++ b/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft