Skip to content

Commit

Permalink
Merge pull request #1018 from slmnemo/nightly_regression
Browse files Browse the repository at this point in the history
Added flush to run_test_case() regression-wally to ensure results are printed to STDOUT
  • Loading branch information
davidharrishmc authored Oct 17, 2024
2 parents c35bfa6 + 4bdc674 commit abb80bb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/regression-wally
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,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

Expand Down

0 comments on commit abb80bb

Please sign in to comment.