From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: fw@strlen.de
Subject: [PATCH nft] tests: display error when trying to run tests out of the root directory
Date: Thu, 3 Sep 2015 19:48:54 +0200 [thread overview]
Message-ID: <1441302534-2724-1-git-send-email-pablo@netfilter.org> (raw)
Since 357d8cfcceb2 ("tests: use the src/nft binary instead of $PATH one"), the
tests fail if you try to run them if you are not under the root directory of
the nftables repository.
Display an error so I don't forget I have to do it like this.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
tests/regression/nft-test.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/regression/nft-test.py b/tests/regression/nft-test.py
index c3d2aae..8168203 100755
--- a/tests/regression/nft-test.py
+++ b/tests/regression/nft-test.py
@@ -879,6 +879,11 @@ def main():
print "You need to be root to run this, sorry"
return
+ if not os.path.isdir("tests/regression/"):
+ print "You have to run nft-test.py from the repository root directory, eg.\n\n" + \
+ " nftables# python tests/regression/nft-test.py\n"
+ return
+
test_files = files_ok = run_total = 0
tests = passed = warnings = errors = 0
global log_file
--
1.7.10.4
reply other threads:[~2015-09-03 17:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1441302534-2724-1-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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 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).