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/02 23:13:18 UTC

[incubator-ponymail-unit-tests] branch master updated: Try flush to fix GH action output ordering

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 9bc2697  Try flush to fix GH action output ordering
9bc2697 is described below

commit 9bc26970f49753c4f6b9bf21ae07a245a299e17c
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jun 3 00:11:49 2021 +0100

    Try flush to fix GH action output ordering
---
 runall.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/runall.py b/runall.py
index 59df018..34faadb 100755
--- a/runall.py
+++ b/runall.py
@@ -64,8 +64,8 @@ if __name__ == '__main__':
                             env[key] = val
                     continue
                 tests_total += 1
-                # Use stderr so appears in correct sequence in logs
-                print("Running '%s' tests from %s..." % (test_type, spec_file), file=sys.stderr)
+                # Use stderr so appears in correct sequence in logs; flush seems to be necessary for GitHub actions
+                print("Running '%s' tests from %s..." % (test_type, spec_file), file=sys.stderr, flush=True)
                 try:
                     cliargs = [PYTHON3, 'tests/test-%s.py' % test_type, '--rootdir', args.rootdir, '--load', spec_file,]
                     if args.nomboxo:
@@ -81,7 +81,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), file=sys.stderr)
+                    print("FAIL: %s test from %s failed with code %d" % (test_type, spec_file, e.returncode), file=sys.stderr, flush=True)
                     tests_failure += 1
                     if args.failonfail:
                         failbreak = True