|
8 | 8 |
|
9 | 9 | // Establish status quo
|
10 | 10 |
|
| 11 | + |
11 | 12 | // RUN: %empty-directory(%t)
|
12 |
| -// RUN: cp %S/Inputs/type-fingerprint/{main,a}.swift %t |
13 |
| -// RUN: cp %S/Inputs/type-fingerprint/ofm.json %t |
14 |
| -// RUN: cp %S/Inputs/type-fingerprint/b0.swift %t/b.swift |
| 13 | +// RUN: cp %S/Inputs/type-fingerprint/* %t |
| 14 | +// RUN: cp %t/definesAB{-before,}.swift |
15 | 15 |
|
16 | 16 | // Seeing weird failure on CI, so set the mod times
|
17 | 17 | // RUN: touch -t 200101010101 %t/*.swift
|
18 | 18 |
|
19 |
| -// RUN: cd %t && %swiftc_driver -disable-type-fingerprints -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output1 |
| 19 | +// RUN: cd %t && %swiftc_driver -disable-type-fingerprints -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output1 |
20 | 20 |
|
21 |
| -// only-run-for-debugging: cp %t/b.swiftdeps %t/b1.swiftdeps |
| 21 | +// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB1.swiftdeps |
22 | 22 |
|
23 | 23 | // Change one type, but uses of all types get recompiled
|
24 | 24 |
|
25 |
| -// RUN: cp %S/Inputs/type-fingerprint/b1.swift %t/b.swift |
| 25 | +// RUN: cp %t/definesAB{-after,}.swift |
26 | 26 |
|
27 |
| -// Seeing weird failure on CI, so ensure that b.swift is newer |
| 27 | +// Seeing weird failure on CI, so ensure that definesAB.swift is newer |
28 | 28 | // RUN: touch -t 200201010101 %t/*
|
29 | 29 | // RUN: touch -t 200101010101 %t/*.swift
|
30 |
| -// RUN: touch -t 200301010101 %t/b.swift |
| 30 | +// RUN: touch -t 200301010101 %t/definesAB.swift |
31 | 31 |
|
32 |
| -// RUN: cd %t && %swiftc_driver -disable-type-fingerprints -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output2 |
| 32 | +// RUN: cd %t && %swiftc_driver -disable-type-fingerprints -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output2 |
33 | 33 |
|
34 | 34 | // Save for debugging:
|
35 |
| -// only-run-for-debugging: cp %t/b.swiftdeps %t/b2.swiftdeps |
| 35 | +// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB1.swiftdeps |
36 | 36 |
|
37 | 37 | // RUN: %FileCheck -check-prefix=CHECK-MAINAB-RECOMPILED %s < %t/output2
|
38 | 38 |
|
39 |
| -// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: b.o <= b.swift} |
40 |
| -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: main.o <= main.swift} |
41 |
| -// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: a.o <= a.swift} |
42 |
| - |
| 39 | +// CHECK-MAINAB-RECOMPILED: Queuing (initial): {compile: definesAB.o <= definesAB.swift} |
| 40 | +// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} |
| 41 | +// CHECK-MAINAB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} |
43 | 42 |
|
44 | 43 | // =============================================================================
|
45 | 44 | // With the fingerprints
|
|
48 | 47 | // Establish status quo
|
49 | 48 |
|
50 | 49 | // RUN: %empty-directory(%t)
|
51 |
| -// RUN: cp %S/Inputs/type-fingerprint/{main,a}.swift %t |
52 |
| -// RUN: cp %S/Inputs/type-fingerprint/ofm.json %t |
53 |
| -// RUN: cp %S/Inputs/type-fingerprint/b0.swift %t/b.swift |
| 50 | +// RUN: cp %S/Inputs/type-fingerprint/* %t |
| 51 | +// RUN: cp %t/definesAB{-before,}.swift |
54 | 52 |
|
55 | 53 | // Seeing weird failure on CI, so set the mod times
|
56 | 54 | // RUN: touch -t 200101010101 %t/*.swift
|
57 | 55 |
|
58 |
| -// RUN: cd %t && %swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output3 |
| 56 | +// RUN: cd %t && %swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output3 |
| 57 | + |
| 58 | +// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB3.swiftdeps |
59 | 59 |
|
60 |
| -// only-run-for-debugging: cp %t/b.swiftdeps %t/b3.swiftdeps |
61 | 60 |
|
62 | 61 | // Change one type, only uses of that type get recompiled
|
63 | 62 |
|
64 |
| -// RUN: cp %S/Inputs/type-fingerprint/b1.swift %t/b.swift |
| 63 | +// RUN: cp %t/definesAB{-after,}.swift |
65 | 64 |
|
66 |
| -// Seeing weird failure on CI, so ensure that b.swift is newer |
| 65 | +// Seeing weird failure on CI, so ensure that definesAB.swift is newer |
67 | 66 | // RUN: touch -t 200201010101 %t/*
|
68 | 67 | // RUN: touch -t 200101010101 %t/*.swift
|
69 |
| -// RUN: touch -t 200301010101 %t/b.swift |
| 68 | +// RUN: touch -t 200301010101 %t/definesAB.swift |
70 | 69 |
|
71 |
| -// RUN: cd %t && %swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental ./main.swift ./a.swift ./b.swift -module-name main -output-file-map ofm.json >&output4 |
| 70 | +// RUN: cd %t && %swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesAB.swift usesA.swift usesB.swift -module-name main -output-file-map ofm.json >&output4 |
72 | 71 |
|
73 |
| -// only-run-for-debugging: cp %t/b.swiftdeps %t/b4.swiftdeps |
| 72 | +// only-run-for-debugging: cp %t/usesB.swiftdeps %t/usesB4.swiftdeps |
74 | 73 |
|
75 | 74 | // RUN: %FileCheck -check-prefix=CHECK-MAINB-RECOMPILED %s < %t/output4
|
76 | 75 |
|
77 |
| -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: a.o <= a.swift} |
78 |
| -// CHECK-MAINB-RECOMPILED: Queuing because of dependencies discovered later: {compile: main.o <= main.swift} |
79 |
| -// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: // CHECK-MAINB-RECOMPILED: a.o <= a.swift} |
| 76 | +// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} |
| 77 | +// CHECK-MAINB-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift} |
| 78 | +// CHECK-MAINB-RECOMPILED-NOT: Queuing because of dependencies discovered later: {compile: usesB.o <= usesB.swift} |
80 | 79 |
|
0 commit comments