diff options
authorArturo Borrero <>2016-04-21 11:43:54 +0200
committerPablo Neira Ayuso <>2016-04-27 19:24:56 +0200
commitfbd103b7200a2530f65a2f1f6bc043ba2b36e5e0 (patch)
parent3deffe8040840ba215e744e0699a8ab3653aac66 (diff)
tests: py: allow to run tests with other nft binaries
Allow to run tests with other nft binaries by reading a 'NFT' environment variable, allowing arbitrary locations for the nft binary. This is what the tests/shell/ script does. Among other thing, this allow us to properly hook this testsuite from the Debian CI environment ( where we can perform tests for packages 'as installed'. Examples: # run with default config (ie src/nft) % ./ # run with installed binary (ie /usr/sbin/nft) % NFT=/usr/sbin/nft ./ Signed-off-by: Arturo Borrero Gonzalez <> Signed-off-by: Pablo Neira Ayuso <>
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/py/ b/tests/py/
index bba91bea..fc7ae608 100755
--- a/tests/py/
+++ b/tests/py/
@@ -19,7 +19,7 @@ import subprocess
import argparse
import signal
-NFT_BIN = "src/nft"
+NFT_BIN = os.getenv('NFT', "src/nft")
TESTS_PATH = os.path.dirname(os.path.abspath(__file__))
TESTS_DIRECTORY = ["any", "arp", "bridge", "inet", "ip", "ip6"]
LOGFILE = "/tmp/nftables-test.log"