2
2
// RUN: %empty-directory(%t/build)
3
3
// RUN: %{python} %utils/split_file.py -o %t %s
4
4
5
- /// Unsupported on Windows for the use of env vars.
6
- // UNSUPPORTED: OS=windows-msvc
7
-
8
5
/// 1. Compile Lib.swift as non-resilient untagged, resilient untagged, and resilient tagged
9
6
// BEGIN Lib.swift
10
7
public func foo( ) { }
11
8
12
9
/// Build Lib as a resilient and non-resilient swiftmodule
13
10
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -o %t/build -parse-stdlib -module-cache-path %t/cache -module-name ResilientLib -enable-library-evolution
14
11
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -o %t/build -parse-stdlib -module-cache-path %t/cache -module-name NonresilientLib
15
- // RUN: SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
12
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
16
13
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -swift-version 5 -o %t/build -parse-stdlib -module-cache-path %t/cache -module-name TaggedLib -enable-library-evolution
17
14
18
15
23
20
24
21
/// Building a NonresilientLib client should always succeed
25
22
// RUN: %target-swift-frontend -typecheck %t/NonresilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
26
- // RUN: SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
23
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
27
24
// RUN: %target-swift-frontend -typecheck %t/NonresilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
28
25
29
26
@@ -36,12 +33,12 @@ foo()
36
33
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
37
34
38
35
/// Building a ResilientLib client should reject the import for a tagged compiler
39
- // RUN: SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision \
36
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision \
40
37
// RUN: not %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s
41
38
// CHECK: compiled module was created by a different version of the compiler; rebuild 'ResilientLib' and try again: {{.*}}ResilientLib.swiftmodule
42
39
43
40
/// Building a ResilientLib client should succeed for a tagged compiler with SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION
44
- // RUN: SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION=true \
41
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION=true \
45
42
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
46
43
47
44
@@ -51,11 +48,11 @@ import TaggedLib
51
48
foo ( )
52
49
53
50
/// Importing TaggedLib should success with the same tag or a dev compiler
54
- // RUN: SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
51
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=my-revision \
55
52
// RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
56
53
// RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
57
54
58
55
/// Building a TaggedLib client should reject the import for a different tagged compiler
59
- // RUN: SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision \
56
+ // RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision \
60
57
// RUN: not %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s --check-prefix=CHECK-TAGGED
61
58
// CHECK-TAGGED: compiled module was created by a different version of the compiler; rebuild 'TaggedLib' and try again: {{.*}}TaggedLib.swiftmodule
0 commit comments