All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [nft PATCH] tests: py: allow to run tests with other nft binaries
Date: Thu, 21 Apr 2016 11:43:54 +0200	[thread overview]
Message-ID: <146123183481.8142.11138398894868501284.stgit@nfdev2.cica.es> (raw)

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/run-tests.sh script does.

Among other thing, this allow us to properly hook this testsuite
from the Debian CI environment (https://ci.debian.net) where we can perform
tests for packages 'as installed'.

Examples:

 # run with default config (ie src/nft)
 % ./nft-test.py

 # run with installed binary (ie /usr/sbin/nft)
 % NFT=/usr/sbin/nft ./nft-test.py

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 tests/py/nft-test.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
index 1256a33..df0fbad 100755
--- a/tests/py/nft-test.py
+++ b/tests/py/nft-test.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"


             reply	other threads:[~2016-04-21  9:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21  9:43 Arturo Borrero Gonzalez [this message]
2016-04-27 17:25 ` [nft PATCH] tests: py: allow to run tests with other nft binaries Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=146123183481.8142.11138398894868501284.stgit@nfdev2.cica.es \
    --to=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.