* [PATCH] tests: xlate: print tests passed or error for testfile argument
@ 2017-10-17 8:09 Harsha Sharma
0 siblings, 0 replies; only message in thread
From: Harsha Sharma @ 2017-10-17 8:09 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, outreachy-kernel, Harsha Sharma
Print tests passed with errors and warnings when run with only specified
test file.
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
xlate-test.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xlate-test.py b/xlate-test.py
index 43c4be19..b7a053f9 100755
--- a/xlate-test.py
+++ b/xlate-test.py
@@ -51,7 +51,7 @@ def run_test(name, payload):
result.append(magenta("exp: ") + expected)
result.append(magenta("res: ") + translation + "\n")
test_passed = False
- elif args.all:
+ elif args.all or args.test:
result.append(green("Ok"))
result.append(magenta("src: ") + line.rstrip(" \n"))
result.append(magenta("res: ") + translation + "\n")
@@ -60,7 +60,7 @@ def run_test(name, payload):
result.append(red("Error: ") + "iptables-translate failure")
result.append(error.decode("utf-8"))
- if not test_passed or args.all:
+ if args.all or args.test:
print("\n".join(result))
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-17 8:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 8:09 [PATCH] tests: xlate: print tests passed or error for testfile argument Harsha Sharma
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).