Skip to content

Commit 4962d12

Browse files
committed
[Test][Backtracing] Pass SWIFT_BACKTRACE through lit if it's set.
If someone explicitly sets `SWIFT_BACKTRACE` and runs `lit`, we should probably pass it through to the tests. rdar://113550381
1 parent 3f26298 commit 4962d12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/lit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,11 @@ backtrace_on_crash = lit_config.params.get('backtrace_on_crash', None)
496496
if backtrace_on_crash is not None:
497497
config.environment['SWIFT_BACKTRACE'] = 'enable=on'
498498

499+
# Make an explicit setting in the environment override whatever we did above
500+
swift_backtrace = os.environ.get('SWIFT_BACKTRACE')
501+
if swift_backtrace:
502+
config.environment['SWIFT_BACKTRACE'] = swift_backtrace
503+
499504
config.available_features.add('lld_lto')
500505

501506
threading = lit_config.params.get('threading', 'none')

0 commit comments

Comments
 (0)