Skip to content

Commit f9f743e

Browse files
committed
tests: enable Serialization test on Windows
Enable the Serialization/restrict-swiftmodule-to-revision on Windows. This test was unnecessarily disabled on Windows due to the use of environment variables which can be accommodated by using the `env` command.
1 parent 319672d commit f9f743e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

test/Serialization/restrict-swiftmodule-to-revision.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22
// RUN: %empty-directory(%t/build)
33
// RUN: %{python} %utils/split_file.py -o %t %s
44

5-
/// Unsupported on Windows for the use of env vars.
6-
// UNSUPPORTED: OS=windows-msvc
7-
85
/// 1. Compile Lib.swift as non-resilient untagged, resilient untagged, and resilient tagged
96
// BEGIN Lib.swift
107
public func foo() {}
118

129
/// Build Lib as a resilient and non-resilient swiftmodule
1310
// 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
1411
// 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 \
1613
// 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
1714

1815

@@ -23,7 +20,7 @@ foo()
2320

2421
/// Building a NonresilientLib client should always succeed
2522
// 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 \
2724
// RUN: %target-swift-frontend -typecheck %t/NonresilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
2825

2926

@@ -36,12 +33,12 @@ foo()
3633
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
3734

3835
/// 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 \
4037
// 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
4138
// CHECK: compiled module was created by a different version of the compiler; rebuild 'ResilientLib' and try again: {{.*}}ResilientLib.swiftmodule
4239

4340
/// 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 \
4542
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
4643

4744

@@ -51,11 +48,11 @@ import TaggedLib
5148
foo()
5249

5350
/// 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 \
5552
// RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
5653
// RUN: %target-swift-frontend -typecheck %t/TaggedClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
5754

5855
/// 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 \
6057
// 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
6158
// CHECK-TAGGED: compiled module was created by a different version of the compiler; rebuild 'TaggedLib' and try again: {{.*}}TaggedLib.swiftmodule

0 commit comments

Comments
 (0)