From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 4/5] tests: xlate-test: Fix for 'make distcheck'
Date: Wed, 6 Nov 2024 17:42:31 +0100 [thread overview]
Message-ID: <20241106164232.3384-4-phil@nwl.cc> (raw)
In-Reply-To: <20241106164232.3384-1-phil@nwl.cc>
Similar problem as with the other suites: The build directory does not
contain test cases, only build results.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
xlate-test.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xlate-test.py b/xlate-test.py
index b6a78bb250e27..1c8cfe71ffd46 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -188,8 +188,10 @@ xtables_nft_multi = 'xtables-nft-multi'
def load_test_files():
test_files = total_tests = total_passed = total_error = total_failed = 0
- tests = sorted(os.listdir("extensions"))
- for test in ['extensions/' + f for f in tests if f.endswith(".txlate")]:
+ tests_path = os.path.join(os.path.dirname(sys.argv[0]), "extensions")
+ tests = sorted(os.listdir(tests_path))
+ for test in [os.path.join(tests_path, f)
+ for f in tests if f.endswith(".txlate")]:
with open(test, "r") as payload:
tests, passed, failed, errors = run_test(test, payload)
test_files += 1
--
2.47.0
next prev parent reply other threads:[~2024-11-06 16:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 16:42 [iptables PATCH 1/5] tests: shell: iptables/0010-wait_0 is unreliable Phil Sutter
2024-11-06 16:42 ` [iptables PATCH 2/5] tests: shell: Print escape sequences with terminals only Phil Sutter
2024-11-06 16:42 ` [iptables PATCH 3/5] tests: iptables-test: Fix for 'make distcheck' Phil Sutter
2024-11-06 16:42 ` Phil Sutter [this message]
2024-11-06 16:42 ` [iptables PATCH 5/5] Makefile.am: Revert to old serial test harness Phil Sutter
2024-11-06 17:13 ` [iptables PATCH 1/5] tests: shell: iptables/0010-wait_0 is unreliable Phil Sutter
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=20241106164232.3384-4-phil@nwl.cc \
--to=phil@nwl.cc \
--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