netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCH] tests: shell: run-tests.sh: use src/nft binary by default
@ 2016-06-23 11:45 Arturo Borrero Gonzalez
  2016-06-23 17:48 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2016-06-23 11:45 UTC (permalink / raw)
  To: netfilter-devel

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>
---
 tests/shell/README       |    4 +++-
 tests/shell/run-tests.sh |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/shell/README b/tests/shell/README
index 2ce4120..cc35cab 100644
--- a/tests/shell/README
+++ b/tests/shell/README
@@ -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/nft ./run-tests.sh
+
+By default the tests are run with the nft binary at '../../src/nft'
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index b10445d..3277655 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [nft PATCH] tests: shell: run-tests.sh: use src/nft binary by default
  2016-06-23 11:45 [nft PATCH] tests: shell: run-tests.sh: use src/nft binary by default Arturo Borrero Gonzalez
@ 2016-06-23 17:48 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-06-23 17:48 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez; +Cc: netfilter-devel

On Thu, Jun 23, 2016 at 01:45:44PM +0200, Arturo Borrero Gonzalez wrote:
> Better use the local tree nft binary rather than the installed one.

Applied, thanks Arturo.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-23 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 11:45 [nft PATCH] tests: shell: run-tests.sh: use src/nft binary by default Arturo Borrero Gonzalez
2016-06-23 17:48 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).