]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: run-tests.sh: use src/nft binary by default
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Thu, 23 Jun 2016 11:45:44 +0000 (13:45 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 23 Jun 2016 17:47:53 +0000 (19:47 +0200)
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>
tests/shell/README
tests/shell/run-tests.sh

index 2ce4120adbdecac5b73931e6361aa2cb33e3021d..2d8681fdc7e60aae6126b41c75a739e97bf5c745 100644 (file)
@@ -20,4 +20,6 @@ Also, test-files will receive the environment variable $NFT which contains the
 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'
index b10445d29463d0ee2407c82c95dbb509d070fa4b..327765508943fc15cb8cacfca051ed11ec39942a 100755 (executable)
@@ -3,6 +3,7 @@
 # Configuration
 TESTDIR="./"
 RETURNCODE_SEPARATOR="_"
+SRC_NFT="../../src/nft"
 
 msg_error() {
        echo "E: $1 ..." >&2
@@ -21,7 +22,7 @@ if [ "$(id -u)" != "0" ] ; then
        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