|
6 | 6 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -driver-show-incremental -output-file-map %t/output.json 2>&1 |%FileCheck %s -check-prefix=MUST-EXEC |
7 | 7 |
|
8 | 8 | // MUST-EXEC-NOT: warning |
9 | | -// MUST-EXEC: inputs: ["./main.swift"], output: {object: "./main.o", swift-dependencies: "./main.swiftdeps"} |
10 | | -// MUST-EXEC: inputs: ["./other.swift"], output: {object: "./other.o", swift-dependencies: "./other.swiftdeps"} |
11 | | -// MUST-EXEC: inputs: ["./yet-another.swift"], output: {object: "./yet-another.o", swift-dependencies: "./yet-another.swiftdeps"} |
| 9 | +// MUST-EXEC: inputs: ["{{(\.\/)?}}main.swift"], output: {object: "{{(\.\/)?}}main.o", swift-dependencies: "{{(\.\/)?}}main.swiftdeps"} |
| 10 | +// MUST-EXEC: inputs: ["{{(\.\/)?}}other.swift"], output: {object: "{{(\.\/)?}}other.o", swift-dependencies: "{{(\.\/)?}}other.swiftdeps"} |
| 11 | +// MUST-EXEC: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {object: "{{(\.\/)?}}yet-another.o", swift-dependencies: "{{(\.\/)?}}yet-another.swiftdeps"} |
12 | 12 | // MUST-EXEC: Disabling incremental build: could not read build record |
13 | 13 |
|
14 | 14 | // RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": [443865900, 0], "./yet-another.swift": [443865900, 0]}, build_time: [443865901, 0]}' > %t/main~buildrecord.swiftdeps |
15 | 15 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=NO-EXEC |
16 | 16 |
|
17 | | -// NO-EXEC: inputs: ["./main.swift"], output: {{[{].*[}]}}, condition: check-dependencies |
18 | | -// NO-EXEC: inputs: ["./other.swift"], output: {{[{].*[}]}}, condition: check-dependencies |
19 | | -// NO-EXEC: inputs: ["./yet-another.swift"], output: {{[{].*[}]}}, condition: check-dependencies |
| 17 | +// NO-EXEC: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]}}, condition: check-dependencies |
| 18 | +// NO-EXEC: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]}}, condition: check-dependencies |
| 19 | +// NO-EXEC: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]}}, condition: check-dependencies |
20 | 20 |
|
21 | 21 |
|
22 | 22 | // RUN: echo '{version: "'$(%swiftc_driver_plain -version | head -n1)'", inputs: {"./main.swift": [443865900, 0], "./other.swift": !private [443865900, 0], "./yet-another.swift": !dirty [443865900, 0]}, build_time: [443865901, 0]}' > %t/main~buildrecord.swiftdeps |
23 | 23 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=BUILD-RECORD |
24 | 24 |
|
25 | | -// BUILD-RECORD: inputs: ["./main.swift"], output: {{[{].*[}]}}, condition: check-dependencies{{$}} |
26 | | -// BUILD-RECORD: inputs: ["./other.swift"], output: {{[{].*[}]}}, condition: run-without-cascading{{$}} |
27 | | -// BUILD-RECORD: inputs: ["./yet-another.swift"], output: {{[{].*[}]$}} |
| 25 | +// BUILD-RECORD: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]}}, condition: check-dependencies{{$}} |
| 26 | +// BUILD-RECORD: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]}}, condition: run-without-cascading{{$}} |
| 27 | +// BUILD-RECORD: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]$}} |
28 | 28 |
|
29 | 29 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift ./added.swift -incremental -output-file-map %t/output.json 2>&1 > %t/added.txt |
30 | 30 | // RUN: %FileCheck %s -check-prefix=BUILD-RECORD < %t/added.txt |
31 | 31 | // RUN: %FileCheck %s -check-prefix=FILE-ADDED < %t/added.txt |
32 | 32 |
|
33 | | -// FILE-ADDED: inputs: ["./added.swift"], output: {{[{].*[}]}}, condition: newly-added{{$}} |
| 33 | +// FILE-ADDED: inputs: ["{{(\.\/)?}}added.swift"], output: {{[{].*[}]}}, condition: newly-added{{$}} |
34 | 34 |
|
35 | 35 | // RUN: %{python} %S/Inputs/touch.py 443865960 %t/main.swift |
36 | 36 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=BUILD-RECORD-PLUS-CHANGE |
37 | | -// BUILD-RECORD-PLUS-CHANGE: inputs: ["./main.swift"], output: {{[{].*[}]}}, condition: run-without-cascading |
38 | | -// BUILD-RECORD-PLUS-CHANGE: inputs: ["./other.swift"], output: {{[{].*[}]}}, condition: run-without-cascading{{$}} |
39 | | -// BUILD-RECORD-PLUS-CHANGE: inputs: ["./yet-another.swift"], output: {{[{].*[}]$}} |
| 37 | +// BUILD-RECORD-PLUS-CHANGE: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]}}, condition: run-without-cascading |
| 38 | +// BUILD-RECORD-PLUS-CHANGE: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]}}, condition: run-without-cascading{{$}} |
| 39 | +// BUILD-RECORD-PLUS-CHANGE: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]$}} |
40 | 40 |
|
41 | 41 | // RUN: %{python} %S/Inputs/touch.py 443865900 %t/* |
42 | 42 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=FILE-REMOVED |
43 | | -// FILE-REMOVED: inputs: ["./main.swift"], output: {{[{].*[}]$}} |
44 | | -// FILE-REMOVED: inputs: ["./other.swift"], output: {{[{].*[}]$}} |
| 43 | +// FILE-REMOVED: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]$}} |
| 44 | +// FILE-REMOVED: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]$}} |
45 | 45 | // FILE-REMOVED-NOT: yet-another.swift |
46 | 46 |
|
47 | 47 |
|
48 | 48 | // RUN: echo '{version: "bogus", inputs: {"./main.swift": [443865900, 0], "./other.swift": !private [443865900, 0], "./yet-another.swift": !dirty [443865900, 0]}}' > %t/main~buildrecord.swiftdeps |
49 | 49 | // RUN: cd %t && %swiftc_driver -driver-print-bindings ./main.swift ./other.swift ./yet-another.swift -incremental -output-file-map %t/output.json 2>&1 | %FileCheck %s -check-prefix=INVALID-RECORD |
50 | 50 |
|
51 | 51 | // INVALID-RECORD-NOT: warning |
52 | | -// INVALID-RECORD: inputs: ["./main.swift"], output: {{[{].*[}]$}} |
53 | | -// INVALID-RECORD: inputs: ["./other.swift"], output: {{[{].*[}]$}} |
54 | | -// INVALID-RECORD: inputs: ["./yet-another.swift"], output: {{[{].*[}]$}} |
| 52 | +// INVALID-RECORD: inputs: ["{{(\.\/)?}}main.swift"], output: {{[{].*[}]$}} |
| 53 | +// INVALID-RECORD: inputs: ["{{(\.\/)?}}other.swift"], output: {{[{].*[}]$}} |
| 54 | +// INVALID-RECORD: inputs: ["{{(\.\/)?}}yet-another.swift"], output: {{[{].*[}]$}} |
0 commit comments