diff options
author | Phil Sutter <phil@nwl.cc> | 2021-08-12 15:12:30 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-09-13 17:00:51 +0200 |
commit | 5166c4451fb837e7d5dbb54a7d7cbf2f0c2469cc (patch) | |
tree | 573e71348b1f2453953ae7600a0a00d1b5ef9740 /xlate-test.py | |
parent | fa78ff15602598a5a0f229055455e67757539372 (diff) |
tests: xlate-test: Print errors to stderr
Return code is always zero, so grepping for output on stderr is a
simple way to detect testsuite failures.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'xlate-test.py')
-rwxr-xr-x | xlate-test.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlate-test.py b/xlate-test.py index 1fa5eca3..bb7a447d 100755 --- a/xlate-test.py +++ b/xlate-test.py @@ -75,7 +75,7 @@ def run_test(name, payload): if (passed == tests) and not args.test: print(name + ": " + green("OK")) if not test_passed: - print("\n".join(result)) + print("\n".join(result), file=sys.stderr) if args.test: print("1 test file, %d tests, %d tests passed, %d tests failed, %d errors" % (tests, passed, failed, errors)) else: @@ -111,7 +111,7 @@ def main(): with open(args.test, "r") as payload: run_test(args.test, payload) except IOError: - print(red("Error: ") + "test file does not exist") + print(red("Error: ") + "test file does not exist", file=sys.stderr) else: load_test_files() |