|
1 | 1 | // RUN: %empty-directory(%t)
|
2 |
| -// RUN: %target-swift-frontend -module-name test -emit-module -o %t/test.swiftmodule -primary-file %s -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=MODULE_OUTPUT |
| 2 | +// RUN: %target-swift-frontend -module-name test -emit-module -o %t/test.swiftmodule -primary-file %s -emit-module-doc-path %t/test.docc -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=MODULE_OUTPUT --check-prefix=DOCC_OUTPUT |
3 | 3 | // RUN: %target-swift-frontend -module-name test -emit-sib -o %t/test.sib -primary-file %s -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=SIB_OUTPUT
|
4 | 4 |
|
5 | 5 | /// object files are "not" deterministic because the second run going to match the mod hash and skip code generation.
|
6 | 6 | // RUN: not %target-swift-frontend -module-name test -c -o %t/test.o -primary-file %s -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=OBJECT_MISMATCH
|
7 | 7 | /// object files should match when forcing object generation.
|
8 |
| -// RUN: %target-swift-frontend -module-name test -c -o %t/test.o -primary-file %s -enable-swift-deterministic-check -always-compile-output-files 2>&1 | %FileCheck %s --check-prefix=OBJECT_OUTPUT |
| 8 | +// RUN: %target-swift-frontend -module-name test -emit-dependencies -c -o %t/test.o -primary-file %s -enable-swift-deterministic-check -always-compile-output-files 2>&1 | %FileCheck %s --check-prefix=OBJECT_OUTPUT --check-prefix=DEPS_OUTPUT |
| 9 | + |
| 10 | +/// FIXME: Fine-grain dependencies graph is not deterministics. |
| 11 | +/// FAIL: %target-swift-frontend -module-name test -emit-reference-dependencies-path %t/test.swiftdeps -c -o %t/test.o -primary-file %s -enable-swift-deterministic-check -always-compile-output-files |
9 | 12 |
|
10 | 13 | /// Explicit module build. Check building swiftmodule from interface file.
|
11 | 14 | // RUN: %target-swift-frontend -scan-dependencies -module-name test -o %t/test.json %s -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=DEPSCAN_OUTPUT
|
|
17 | 20 | /// Force swiftmodule generation.
|
18 | 21 | // RUN: %target-swift-frontend -compile-module-from-interface %t/test.swiftinterface -explicit-interface-module-build -o %t/test.swiftmodule -enable-swift-deterministic-check -always-compile-output-files 2>&1 | %FileCheck --check-prefix=MODULE_OUTPUT %s
|
19 | 22 |
|
| 23 | +// RUN: %target-swift-frontend -scan-dependencies -module-name test %s -o %t/test.deps.json -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=DEPS_JSON_OUTPUT |
| 24 | + |
| 25 | +// RUN: %target-swift-frontend -emit-pcm -module-name UserClangModule -o %t/test.pcm %S/Inputs/dependencies/module.modulemap -enable-swift-deterministic-check 2>&1 | %FileCheck %s --check-prefix=PCM_OUTPUT |
| 26 | + |
| 27 | +// DOCC_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.docc' |
20 | 28 | // MODULE_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.swiftmodule'
|
21 | 29 | // SIB_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.sib'
|
| 30 | +// DEPS_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.d' |
22 | 31 | // OBJECT_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.o'
|
23 | 32 | // OBJECT_MISMATCH: error: output file '{{.*}}{{/|\\}}test.o' is missing from second compilation for deterministic check
|
24 | 33 | // DEPSCAN_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.json'
|
25 | 34 | // INTERFACE_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.swiftinterface'
|
26 | 35 | // MODULE_MISMATCH: error: output file '{{.*}}{{/|\\}}test.swiftmodule' is missing from second compilation for deterministic check
|
| 36 | +// DEPS_JSON_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.deps.json' |
| 37 | +// PCM_OUTPUT: remark: produced matching output file '{{.*}}{{/|\\}}test.pcm' |
27 | 38 |
|
28 | 39 | public var x = 1
|
29 | 40 | public func test() {}
|
0 commit comments