From 4bdc6749edb782e7ef1989c988cd76a5f36109c6 Mon Sep 17 00:00:00 2001 From: slmnemo Date: Wed, 16 Oct 2024 18:23:03 -0700 Subject: [PATCH] Added flush to run_test_case regression-wally to ensure results are printed to stdout for regression-wally. --- bin/regression-wally | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/regression-wally b/bin/regression-wally index 16286c60b..3b256182a 100755 --- a/bin/regression-wally +++ b/bin/regression-wally @@ -338,14 +338,15 @@ def run_test_case(config): grepfile = config.grepfile cmd = config.cmd os.chdir(regressionDir) - # print(" run_test_case invoking %s" % cmd) + # print(" run_test_case invoking %s" % cmd, flush=True) os.system(cmd) if search_log_for_text(config.grepstr, grepfile): -# print(f"{bcolors.OKGREEN}%s_%s: Success{bcolors.ENDC}" % (config.variant, config.name)) - print(f"{bcolors.OKGREEN}%s: Success{bcolors.ENDC}" % (config.cmd)) + # Flush is needed to flush output to stdout when running in multiprocessing Pool +# print(f"{bcolors.OKGREEN}%s_%s: Success{bcolors.ENDC}" % (config.variant, config.name), flush=True) + print(f"{bcolors.OKGREEN}%s: Success{bcolors.ENDC}" % (config.cmd), flush=True) return 0 else: - print(f"{bcolors.FAIL}%s: Failures detected in output{bcolors.ENDC}" % (config.cmd)) + print(f"{bcolors.FAIL}%s: Failures detected in output{bcolors.ENDC}" % (config.cmd), flush=True) print(" Check %s" % grepfile) return 1