diff options
author | Neutron Soutmun <neo.neutron@gmail.com> | 2014-04-04 10:24:22 +0700 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-04-07 21:56:45 +0200 |
commit | f7cafd65feda94b6f21c6b6e36e2bf258e2563d3 (patch) | |
tree | 8e470a67c40a97c012ccb737a9e9d878060e05a4 /tests/check_counters | |
parent | 485b3a2d8f46354ebde6017c9bab528108742268 (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_counters')
-rwxr-xr-x[-rw-r--r--] | tests/check_counters | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/check_counters b/tests/check_counters index 0099f23..912067a 100644..100755 --- a/tests/check_counters +++ b/tests/check_counters @@ -1,6 +1,8 @@ #!/bin/bash -read ip p packets b bytes <<< $(../src/ipset l $1 | grep ^$2) +ipset=${IPSET_BIN:-../src/ipset} + +read ip p packets b bytes <<< $($ipset l $1 | grep ^$2) test -z "$packets" -o -z "$bytes" && exit 1 test $packets -ne $3 -o $bytes -ne $4 && exit 1 exit 0 |