diff options
author | Phil Sutter <phil@nwl.cc> | 2017-07-25 20:39:44 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-07-27 10:50:21 +0200 |
commit | a19d8b73b75e58f4b62f78f9ef36b637815a93b1 (patch) | |
tree | 73b4cf4448e2410c10b976413533cb39e7f004e2 /tests/monitor/run-tests.sh | |
parent | 3c3c91bda0e0e17ff7791eff5614276bd1c6c148 (diff) |
tests/monitor: Clear ruleset after testing
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/monitor/run-tests.sh')
-rwxr-xr-x | tests/monitor/run-tests.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh index de194624..9fd0e504 100755 --- a/tests/monitor/run-tests.sh +++ b/tests/monitor/run-tests.sh @@ -2,17 +2,18 @@ cd $(dirname $0) +nft=../../src/nft +mydiff() { + diff -w -I '^# ' "$@" +} + testdir=$(mktemp -d) if [ ! -d $testdir ]; then echo "Failed to create test directory" >&2 exit 0 fi -trap "rm -rf $testdir" EXIT +trap "rm -rf $testdir; $nft flush ruleset" EXIT -nft=../../src/nft -mydiff() { - diff -w -I '^# ' "$@" -} command_file=$(mktemp -p $testdir) output_file=$(mktemp -p $testdir) |