Better use the local tree nft binary rather than the installed one.
Requested-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
path to the nftables binary being tested.
You can pass an arbitrary $NFT value as well:
- % NFT=../../src/nft ./run-tests.sh
+ % NFT=/usr/local/sbin/nft ./run-tests.sh
+
+By default the tests are run with the nft binary at '../../src/nft'
# Configuration
TESTDIR="./"
RETURNCODE_SEPARATOR="_"
+SRC_NFT="../../src/nft"
msg_error() {
echo "E: $1 ..." >&2
msg_error "this requires root!"
fi
-[ -z "$NFT" ] && NFT="$(which nft)"
+[ -z "$NFT" ] && NFT=$SRC_NFT
if [ ! -x "$NFT" ] ; then
msg_error "no nft binary!"
else