-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathcross-file-failure.swift
29 lines (20 loc) · 1.37 KB
/
cross-file-failure.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Establish baseline
// RUN: %empty-directory(%t)
// RUN: cp %S/Inputs/cross-file-failure/* %t
// RUN: cp %t/definesA{-one,}.swift
// RUN: touch -t 200101010101 %t/*.swift
// RUN: cd %t
// RUN: %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-baseline
// Change one type and cause a syntax error. This should cause _both_ files to
// rebuild.
// RUN: cp %t/definesA{-two,}.swift
// RUN: touch -t 200201010101 %t/*
// RUN: touch -t 200101010101 %t/*.swift
// RUN: touch -t 200301010101 %t/definesA.swift
// RUN: not %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json
// RUN: cp %t/definesA{-three,}.swift
// RUN: touch -t 200401010101 %t/definesA.swift
// RUN: not %target-stdlib-swiftc_driver -enable-batch-mode -j2 -incremental -driver-show-incremental main.swift definesA.swift usesA.swift -module-name main -output-file-map ofm.json >&output-incremental
// RUN: %FileCheck -check-prefix=CHECK-RECOMPILED %s --dump-input=always < %t/output-incremental
// CHECK-RECOMPILED: Queuing (initial): {compile: definesA.o <= definesA.swift}
// CHECK-RECOMPILED: Queuing because of dependencies discovered later: {compile: usesA.o <= usesA.swift}