From: Phil Sutter Date: Sun, 5 Mar 2023 11:43:23 +0000 (+0100) Subject: tests: xlate: Test built binary by default X-Git-Tag: v7.18~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=621f3a27d058d1e2e3e884fa70503e2de5b6c742;p=thirdparty%2Fipset.git 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 --- diff --git a/tests/xlate/ipset-translate b/tests/xlate/ipset-translate new file mode 120000 index 00000000..91980c18 --- /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 a2a02c05..6a2f80c0 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