diff options
author | Phil Sutter <phil@nwl.cc> | 2023-03-05 12:43:23 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-03-10 13:16:51 +0100 |
commit | 621f3a27d058d1e2e3e884fa70503e2de5b6c742 (patch) | |
tree | 2b8c6f18cb9cb0241d31ac8a7782ff4ea805c52a /tests | |
parent | 5f4f4ed045fa84c65380bdc5556c81a765ebab86 (diff) |
tests: xlate: Test built binary by default
Testing the host's iptables-translate by default is unintuitive. Since
the ipset-translate symlink is created upon 'make install', add a local
symlink to the repository pointing at a built binary in src/. Using this
by default is consistent with the regular testsuite.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests')
l--------- | tests/xlate/ipset-translate | 1 | ||||
-rwxr-xr-x | tests/xlate/runtest.sh | 8 |
2 files changed, 3 insertions, 6 deletions
diff --git a/tests/xlate/ipset-translate b/tests/xlate/ipset-translate new file mode 120000 index 0000000..91980c1 --- /dev/null +++ b/tests/xlate/ipset-translate @@ -0,0 +1 @@ +../../src/ipset
\ No newline at end of file diff --git a/tests/xlate/runtest.sh b/tests/xlate/runtest.sh index a2a02c0..6a2f80c 100755 --- a/tests/xlate/runtest.sh +++ b/tests/xlate/runtest.sh @@ -6,14 +6,10 @@ if [ ! -x "$DIFF" ] ; then exit 1 fi -IPSET_XLATE=$(which ipset-translate) -if [ ! -x "$IPSET_XLATE" ] ; then - echo "ERROR: ipset-translate is not installed yet" - exit 1 -fi +ipset_xlate=${IPSET_XLATE_BIN:-$(dirname $0)/ipset-translate} TMP=$(mktemp) -ipset-translate restore < xlate.t &> $TMP +$ipset_xlate restore < xlate.t &> $TMP if [ $? -ne 0 ] then cat $TMP |