diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-11-03 22:53:45 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-11-03 22:53:45 +0200 |
commit | e115782a8dfa0299b13ab79b2d266454f3331363 (patch) | |
tree | e0607930aa4d1f32bffb789c2bed8b1ccd33f962 /test.sh | |
parent | 380590e5ce3b2047d5c39f4db440faf82872f2e5 (diff) | |
download | awall-e115782a8dfa0299b13ab79b2d266454f3331363.tar.bz2 awall-e115782a8dfa0299b13ab79b2d266454f3331363.tar.xz |
test: remove generated policiesv1.5.0
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 |