Skip to content

Commit a24a43e

Browse files
ax3lRemiLehe
andcommitted
CI: Print error reports when tests fail
Print compilation messages and script output messages when they fail. This is needed for CI to spot the underlying error. Port of ECP-WarpX@8abcbe3 by @RemiLehe Co-authored-by: Remi Lehe <[email protected]>
1 parent 395cf1e commit a24a43e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

regtest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,10 @@ def test_suite(argv):
563563
if not test.compile_successful:
564564
error_msg = "ERROR: compilation failed"
565565
report.report_single_test(suite, test, test_list, failure_msg=error_msg)
566+
# Print compilation error message (useful for CI tests)
567+
with open(f"{output_dir}/{test.name}.make.out") as f:
568+
print(f.read())
569+
566570
continue
567571

568572
if test.compileTest:
@@ -1078,6 +1082,9 @@ def test_suite(argv):
10781082
else:
10791083
analysis_successful = False
10801084
suite.log.warn("analysis failed...")
1085+
# Print analysis error message (useful for CI tests)
1086+
with open(outfile) as f:
1087+
print(f.read())
10811088

10821089
test.analysis_successful = analysis_successful
10831090

0 commit comments

Comments
 (0)