|
17 | 17 | // RUN: %t/A.swift |
18 | 18 |
|
19 | 19 | /// Import testable build, should use binary but no extra dependencies. |
20 | | -// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-serialized -module-name Test %t/main.swift \ |
| 20 | +// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-serialized -module-name Test %t/main.swift \ |
21 | 21 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
22 | 22 | // RUN: -o %t/deps1.json -I %t/testable -swift-version 5 -Rmodule-loading |
23 | 23 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps1.json Test directDependencies | %FileCheck %s --check-prefix TEST1 |
|
26 | 26 | // EMPTY-NOT: B |
27 | 27 |
|
28 | 28 | /// Import regular build, should use binary. |
29 | | -// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-serialized -module-name Test %t/main.swift \ |
| 29 | +// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-serialized -module-name Test %t/main.swift \ |
30 | 30 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
31 | 31 | // RUN: -o %t/deps2.json -I %t/regular -swift-version 5 -Rmodule-loading |
32 | 32 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps2.json Test directDependencies | %FileCheck %s --check-prefix TEST2 |
33 | 33 | // TEST2: "swiftPrebuiltExternal": "A" |
34 | 34 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps2.json swiftPrebuiltExternal:A directDependencies | %FileCheck %s --check-prefix EMPTY --allow-empty |
35 | 35 |
|
36 | 36 | /// Testable import testable build, should use binary, even interface is preferred. |
37 | | -// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface -module-name Test %t/testable.swift \ |
| 37 | +// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-interface -module-name Test %t/testable.swift \ |
38 | 38 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -enable-testing \ |
39 | 39 | // RUN: -o %t/deps3.json -I %t/testable -I %t/internal -swift-version 5 -Rmodule-loading |
40 | 40 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps3.json Test directDependencies | %FileCheck %s --check-prefix TEST3 |
|
43 | 43 | // TEST3-A: "swift": "B" |
44 | 44 |
|
45 | 45 | /// Testable import sees non-testable module first, keep searching. |
46 | | -// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface -module-name Test %t/testable.swift \ |
| 46 | +// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-interface -module-name Test %t/testable.swift \ |
47 | 47 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -enable-testing \ |
48 | 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 |
|
52 | 52 | // TEST4-A: "swift": "B" |
53 | 53 |
|
54 | 54 | /// Testable import non-testable build enable testing, warning about the finding then error out. |
55 | | -// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface -module-name Test %t/testable.swift \ |
| 55 | +// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-interface -module-name Test %t/testable.swift \ |
56 | 56 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -enable-testing \ |
57 | 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 | 58 | // WARN: warning: ignore swiftmodule built without '-enable-testing' |
59 | 59 | // ERROR: error: Unable to find module dependency: 'A' |
60 | 60 |
|
61 | 61 | /// Regular import a testable module with no interface, don't load optional dependencies. |
62 | 62 | // RUN: rm %t/testable/A.swiftinterface |
63 | | -// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface -module-name Test %t/main.swift \ |
| 63 | +// RUN: %target-swift-frontend -scan-dependencies -scanner-module-validation -module-load-mode prefer-interface -module-name Test %t/main.swift \ |
64 | 64 | // RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -enable-testing \ |
65 | 65 | // RUN: -o %t/deps6.json -I %t/testable -swift-version 5 -Rmodule-loading |
66 | 66 | // RUN: %{python} %S/../CAS/Inputs/SwiftDepsExtractor.py %t/deps6.json Test directDependencies | %FileCheck %s --check-prefix TEST6 |
|
0 commit comments