Skip to content

Commit 1031abe

Browse files
committed
Updated test/lit.cfg to respect the TOOLCHAINS environment variable when deciding the xcrun toolchain for Darwin platforms, rather than hardcoding the default.
1 parent dadb2bc commit 1031abe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/lit.cfg

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ if config.test_exec_root is None:
152152
# name: The name of this test suite.
153153
config.name = 'Swift(%s)' % config.variant_suffix[1:]
154154

155-
# Tweak the environment appropriately for various platforms.
155+
# Respect the TOOLCHAINS environment variable when deciding the xcrun
156+
# toolchain for Darwin platforms.
156157
if platform.system() == 'Darwin':
157-
# Prefer the latest version of the Xcode tools.
158-
config.environment['TOOLCHAINS'] = 'default'
158+
config.environment['TOOLCHAINS'] = \
159+
os.environ.get('TOOLCHAINS', config.darwin_xcrun_toolchain)
159160

160161
# testFormat: The test format to use to interpret tests.
161162
config.test_format = swift_test.SwiftTest(coverage_mode=config.coverage_mode)

0 commit comments

Comments
 (0)