|
42 | 42 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps3.json swiftPrebuiltExternal:A directDependencies | %FileCheck %s --check-prefix TEST3-A
|
43 | 43 | // TEST3-A: "swift": "B"
|
44 | 44 |
|
45 |
| -/// Testable import non-testable build without enable testing. |
| 45 | +/// Testable import sees non-testable module first, keep searching. |
46 | 46 | // RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface -module-name Test %t/testable.swift \
|
47 |
| -// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
48 |
| -// RUN: -o %t/deps4.json -I %t/regular -swift-version 5 |
| 47 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -enable-testing \ |
| 48 | +// RUN: -o %t/deps4.json -I %t/regular -I %t/testable -I %t/internal -swift-version 5 -Rmodule-loading 2>&1 | %FileCheck %s --check-prefix WARN |
49 | 49 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps4.json Test directDependencies | %FileCheck %s --check-prefix TEST4
|
50 | 50 | // TEST4: "swiftPrebuiltExternal": "A"
|
51 |
| -// RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps4.json swiftPrebuiltExternal:A directDependencies | %FileCheck %s --check-prefix EMPTY --allow-empty |
| 51 | +// RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps4.json swiftPrebuiltExternal:A directDependencies | %FileCheck %s --check-prefix TEST4-A |
| 52 | +// TEST4-A: "swift": "B" |
52 | 53 |
|
53 |
| -/// Testable import non-testable build enable testing, still succeed since swift-frontend can provide a better diagnostics when the module is actually imported. |
| 54 | +/// Testable import non-testable build enable testing, warning about the finding then error out. |
54 | 55 | // RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface -module-name Test %t/testable.swift \
|
55 | 56 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -enable-testing \
|
56 |
| -// RUN: -o %t/deps5.json -I %t/regular -swift-version 5 -Rmodule-loading |
| 57 | +// RUN: -o %t/deps5.json -I %t/regular -swift-version 5 -Rmodule-loading 2>&1 | %FileCheck %s --check-prefix WARN --check-prefix ERROR |
| 58 | +// WARN: warning: ignore swiftmodule built without '-enable-testing' |
| 59 | +// ERROR: error: Unable to find module dependency: 'A' |
57 | 60 |
|
58 | 61 | /// Regular import a testable module with no interface, don't load optional dependencies.
|
59 | 62 | // RUN: rm %t/testable/A.swiftinterface
|
|
0 commit comments