You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/06/01 21:55:17 UTC

[incubator-ponymail-unit-tests] branch master updated: Easier to read logs

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-unit-tests.git


The following commit(s) were added to refs/heads/master by this push:
     new 60c2ab0  Easier to read logs
60c2ab0 is described below

commit 60c2ab078bebe7631558ba97ddda8e3aab2e3695
Author: Sebb <se...@apache.org>
AuthorDate: Tue Jun 1 22:55:05 2021 +0100

    Easier to read logs
---
 runall.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/runall.py b/runall.py
index 9bac2c5..a012411 100755
--- a/runall.py
+++ b/runall.py
@@ -51,7 +51,8 @@ if __name__ == '__main__':
                             env[key] = val
                     continue
                 tests_total += 1
-                print("Running '%s' tests from %s..." % (test_type, spec_file))
+                # Use stderr so appears in correct sequence in logs
+                print("Running '%s' tests from %s..." % (test_type, spec_file), file=sys.stderr)
                 try:
                     if args.nomboxo:
                         rv = subprocess.check_output(
@@ -64,7 +65,7 @@ if __name__ == '__main__':
                     tests_success += 1
                 except subprocess.CalledProcessError as e:
                     rv = e.output
-                    print("%s test from %s failed with code %d" % (test_type, spec_file, e.returncode))
+                    print("%s test from %s failed with code %d" % (test_type, spec_file, e.returncode), file=sys.stderr)
                     tests_failure += 1
                     if args.failonfail:
                         failbreak = True
@@ -78,6 +79,7 @@ if __name__ == '__main__':
         if failbreak:
             break
 
+    # No need for stderr at end of run
     print("-------------------------------------")
     print("Done with %u specification%s in %.2f seconds" % (tests_total, 's' if tests_total != 1 else '', time.time() - now))
     print("Specs processed: %4u" % tests_total)