Skip to content

Commit 70f32e2

Browse files
authored
Merge pull request #116 from ax3l/topic-verboseOption
Add `suite.verbose` option
2 parents 90a038b + a78d55f commit 70f32e2

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

suite.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ def __init__(self, args):
383383
self.args = args
384384
self.apply_args()
385385

386+
self.verbose = 0 # repeat captured errors to stderr, e.g., for CI runs
387+
386388
# this will hold all of the Repo() objects for the AMReX, source,
387389
# and build directories
388390
self.repos = {}

test_report.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,11 @@ def report_single_test(suite, test, tests, failure_msg=None):
378378
elif test.crashed:
379379
sf.write("CRASHED\n")
380380
if len(test.backtrace) > 0:
381-
for btf in test.backtrace:
382-
suite.log.warn(f"+++ Next backtrace: {btf} +++")
383-
suite.log.warn(open(btf, 'r').read())
384-
suite.log.warn(f"+++ End of backtrace: {btf} +++\n")
381+
if suite.verbose > 0:
382+
for btf in test.backtrace:
383+
suite.log.warn(f"+++ Next backtrace: {btf} +++")
384+
suite.log.warn(open(btf, 'r').read())
385+
suite.log.warn(f"+++ End of backtrace: {btf} +++\n")
385386
suite.log.testfail(f"{test.name} CRASHED (backtraces produced)")
386387
else:
387388
suite.log.testfail(f"{test.name} CRASHED (script failed)")

test_util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
1515
[main]
1616
17+
verbose = < repeat captured errors to stderr, e.g., for CI runs >
18+
1719
testTopDir = < full path to test output directory >
1820
webTopDir = < full path to test web output directory >
1921
wallclockFile = < name of json file for storing past runtimes, to which .json will be appended;

0 commit comments

Comments
 (0)