summaryrefslogtreecommitdiffstats
path: root/tests/check_extensions
diff options
context:
space:
mode:
authorNeutron Soutmun <neo.neutron@gmail.com>2014-04-04 10:24:22 +0700
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2014-04-07 21:56:45 +0200
commitf7cafd65feda94b6f21c6b6e36e2bf258e2563d3 (patch)
tree8e470a67c40a97c012ccb737a9e9d878060e05a4 /tests/check_extensions
parent485b3a2d8f46354ebde6017c9bab528108742268 (diff)
ipset: Pass IPSET_BIN to test scripts to change binary location
In the "as-installed" package testing situation, the test scripts should invokes the system installed "ipset" binary. Therefore, the IPSET_BIN could be passed to change the binary location. IPSET_BIN=/sbin/ipset ./runtest.sh The test scripts run fine in build source tree without IPSET_BIN. Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'tests/check_extensions')
-rwxr-xr-x[-rw-r--r--]tests/check_extensions4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/check_extensions b/tests/check_extensions
index 5848b38..77e7c2c 100644..100755
--- a/tests/check_extensions
+++ b/tests/check_extensions
@@ -1,6 +1,8 @@
#!/bin/bash
-read ip t timeout p packets b bytes <<< $(../src/ipset l $1 | grep ^$2)
+ipset=${IPSET_BIN:-../src/ipset}
+
+read ip t timeout p packets b bytes <<< $($ipset l $1 | grep ^$2)
test -z "$timeout" -o -z "$packets" -o -z "$bytes" && exit 1
test $timeout -gt $3 -o $timeout -lt $(($3 - 10)) && exit 1
test $packets -ne $4 -o $bytes -ne $5 && exit 1