aboutsummaryrefslogtreecommitdiffstats
path: root/test.sh
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-11-03 22:53:45 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-11-03 22:53:45 +0200
commite115782a8dfa0299b13ab79b2d266454f3331363 (patch)
treee0607930aa4d1f32bffb789c2bed8b1ccd33f962 /test.sh
parent380590e5ce3b2047d5c39f4db440faf82872f2e5 (diff)
downloadawall-e115782a8dfa0299b13ab79b2d266454f3331363.tar.bz2
awall-e115782a8dfa0299b13ab79b2d266454f3331363.tar.xz
test: remove generated policiesv1.5.0
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/test.sh b/test.sh
index ad3b418..897b8a6 100755
--- a/test.sh
+++ b/test.sh
@@ -11,11 +11,16 @@ export LUA_PATH="./?.lua;;"
LUA=lua${LUA_VERSION}
AWALL="$LUA ./awall-cli"
+GEN_POLICIES=
+
for cls in mandatory optional private; do
eval "export AWALL_PATH_$(echo $cls | tr a-z A-Z)=test/$cls"
mkdir -p test/$cls
for script in test/$cls/*.lua; do
- [ -f $script ] && $LUA $script > ${script%.lua}.json
+ [ -f $script ] || continue
+ policy=${script%.lua}.json
+ GEN_POLICIES="$GEN_POLICIES $policy"
+ $LUA $script > $policy
done
done
@@ -34,4 +39,7 @@ for pol in $POLICIES; do
$AWALL ${1:-diff} -o $dir || RC=1
$AWALL disable $pol
done
+
+rm $GEN_POLICIES
+
exit $RC