summaryrefslogtreecommitdiffstats
path: root/tests/monitor/run-tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/monitor/run-tests.sh')
-rwxr-xr-xtests/monitor/run-tests.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh
index ff00450b..f1ac790a 100755
--- a/tests/monitor/run-tests.sh
+++ b/tests/monitor/run-tests.sh
@@ -74,7 +74,7 @@ monitor_run_test() {
echo "command file:"
cat $command_file
}
- $nft -f $command_file || {
+ $nft -f - <$command_file || {
err "nft command failed!"
rc=1
}
@@ -103,7 +103,7 @@ echo_run_test() {
echo "command file:"
cat $command_file
}
- $nft -nn -e -f $command_file >$echo_output || {
+ $nft -nn -e -f - <$command_file >$echo_output || {
err "nft command failed!"
rc=1
}
@@ -161,7 +161,10 @@ for variant in $variants; do
output_append=${variant}_output_append
for testcase in ${testcases:-testcases/*.t}; do
- echo "$variant: running tests from file $(basename $testcase)"
+ filename=$(basename $testcase)
+ echo "$variant: running tests from file $filename"
+ rc_start=$rc
+
# files are like this:
#
# I add table ip t
@@ -199,6 +202,10 @@ for variant in $variants; do
$run_test
let "rc += $?"
}
+
+ let "rc_diff = rc - rc_start"
+ [[ $rc_diff -ne 0 ]] && \
+ echo "$variant: $rc_diff tests from file $filename failed"
done
done
exit $rc