Skip to content

Commit 43de5bf

Browse files
authored
Merge pull request swiftlang#245 from apple/add-env-to-source-compat
Add environment variable for projects to detect it's running part of Swift Source Compat Suite
2 parents 14287b6 + 7fe8aa5 commit 43de5bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: project.py

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ def build_swift_package(path, swiftc, configuration, sandbox_profile,
196196
stdout=stdout, stderr=stderr)
197197
env = os.environ
198198
env['SWIFT_EXEC'] = swiftc
199+
env['SWIFT_SOURCE_COMPAT_SUITE'] = "1"
199200
command = [swift, 'build', '-C', path, '--verbose',
200201
'--configuration', configuration]
201202
if (swift_branch not in ['swift-3.0-branch',
@@ -220,6 +221,7 @@ def test_swift_package(path, swiftc, sandbox_profile,
220221
clean_swift_package(path, swiftc, sandbox_profile)
221222
env = os.environ
222223
env['SWIFT_EXEC'] = swiftc
224+
env['SWIFT_SOURCE_COMPAT_SUITE'] = "1"
223225
command = [swift, 'test', '-C', path, '--verbose']
224226
if added_swift_flags is not None:
225227
for flag in added_swift_flags.split():

0 commit comments

Comments
 (0)