Skip to content

Commit b82e7bf

Browse files
committed
Add explicit builds mode to tests
1 parent 5da8812 commit b82e7bf

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

test/Frontend/module-alias-scan-deps.swift

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,44 @@
1010
// RUN: %target-swift-frontend -module-name AppleLogging -module-alias XLogging=AppleLogging %t/FileLogging.swift -emit-module -emit-module-path %t/AppleLogging.swiftmodule
1111
// RUN: test -f %t/AppleLogging.swiftmodule
1212

13-
/// Scaned dependencies should contain real name AppleLogging
13+
/// Scaned dependencies with implicit builds should contain real name AppleLogging
1414
// RUN: %target-swift-frontend -scan-dependencies %t/FileLib.swift -module-alias XLogging=AppleLogging -I %t > %t/scandump.output
1515
// RUN: %FileCheck %s -check-prefix=CHECK-REAL-NAME -input-file %t/scandump.output
1616
// CHECK-REAL-NAME-NOT: "swiftPrebuiltExternal": "XLogging"
1717
// CHECK-REAL-NAME-NOT: "compiledModulePath":{{.*}}XLogging.swiftmodule",
1818
// CHECK-REAL-NAME: "swiftPrebuiltExternal": "AppleLogging"
1919
// CHECK-REAL-NAME: "compiledModulePath":{{.*}}AppleLogging.swiftmodule",
2020

21+
/// Scaned dependencies with explicit builds should contain real name AppleLogging
22+
// RUN: %target-swift-frontend -scan-dependencies -disable-implicit-swift-modules %t/FileLib.swift -module-alias XLogging=AppleLogging -I %t > %t/scandumpExplicit.output
23+
// RUN: %FileCheck %s -check-prefix=CHECK-REAL-NAME-EXP -input-file %t/scandumpExplicit.output
24+
// CHECK-REAL-NAME-EXP-NOT: "swiftPrebuiltExternal": "XLogging"
25+
// CHECK-REAL-NAME-EXP-NOT: "compiledModulePath":{{.*}}XLogging.swiftmodule",
26+
// CHECK-REAL-NAME-EXP: "swiftPrebuiltExternal": "AppleLogging"
27+
// CHECK-REAL-NAME-EXP: "compiledModulePath":{{.*}}AppleLogging.swiftmodule",
28+
2129
/// Create AppleLoggingIF.swiftinterface by aliasing XLogging
2230
///
2331
// RUN: %target-swift-frontend -module-name AppleLoggingIF %t/FileLogging.swift -module-alias XLogging=AppleLoggingIF -I %t -emit-module -emit-module-interface-path %t/AppleLoggingIF.swiftinterface -swift-version 5 -enable-library-evolution -I %t
2432
// RUN: test -f %t/AppleLoggingIF.swiftinterface
2533

26-
/// Scaned dependencies should contain real name AppleLoggingIF
34+
/// Scaned dependencies with implicit builds should contain real name AppleLoggingIF
2735
// RUN: %target-swift-frontend -scan-dependencies %t/FileLib.swift -module-alias XLogging=AppleLoggingIF -I %t > %t/scandumpIF.output
2836
// RUN: %FileCheck %s -check-prefix=CHECK-REAL-NAME-IF -input-file %t/scandumpIF.output
2937
// CHECK-REAL-NAME-IF-NOT: "swift": "XLogging"
3038
// CHECK-REAL-NAME-IF-NOT: "moduleInterfacePath":{{.*}}XLogging.swiftinterface
3139
// CHECK-REAL-NAME-IF: "swift": "AppleLoggingIF"
3240
// CHECK-REAL-NAME-IF: "moduleInterfacePath":{{.*}}AppleLoggingIF.swiftinterface
3341

42+
/// Scaned dependencies with explicit builds should contain real name AppleLoggingIF
43+
// RUN: %target-swift-frontend -scan-dependencies -disable-implicit-swift-modules %t/FileLib.swift -module-alias XLogging=AppleLoggingIF -I %t > %t/scandumpIF.output
44+
// RUN: %FileCheck %s -check-prefix=CHECK-REAL-NAME-IF-EXP -input-file %t/scandumpIF.output
45+
// CHECK-REAL-NAME-IF-EXP-NOT: "swift": "XLogging"
46+
// CHECK-REAL-NAME-IF-EXP-NOT: "moduleInterfacePath":{{.*}}XLogging.swiftinterface
47+
// CHECK-REAL-NAME-IF-EXP: "swift": "AppleLoggingIF"
48+
// CHECK-REAL-NAME-IF-EXP: "moduleInterfacePath":{{.*}}AppleLoggingIF.swiftinterface
49+
50+
3451
// BEGIN FileLogging.swift
3552
public struct Logger {
3653
public init() {}

0 commit comments

Comments
 (0)