Skip to content

Commit b22d2c9

Browse files
committed
Hack Around Incremental Test Mod Times Bugs In Binutils
Modification times are not accurately maintained by tools like cp. Touch these build products explicitly to kick the incremental machinery into gear.
1 parent 15d566d commit b22d2c9

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

test/Incremental/CrossModule/external-cascade.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp -r %S/Inputs/external-cascade/* %t
33

4-
// No reason to run these tests on the simulator hosts rdar://70772320
5-
// UNSUPPORTED: CPU=x86_64 && OS=ios
6-
// UNSUPPORTED: CPU=x86_64 && OS=tvos
7-
// UNSUPPORTED: CPU=x86_64 && OS=watchos
8-
// UNSUPPORTED: CPU=i386 && OS=watchos
9-
104
//
115
// This test establishes a chain of modules that all depend on a set of
126
// bridging headers. This test ensures that changes to external dependencies -
@@ -32,6 +26,7 @@
3226

3327
// RUN: rm %t/another-header.h
3428
// RUN: cp %S/Inputs/external-cascade/another-header.h %t/another-header.h
29+
// RUN: touch %t/another-header.h
3530
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/C.swiftmodule -enable-experimental-cross-module-incremental-build -module-name C -I %t -output-file-map %t/C.json -working-directory %t -import-objc-header %t/bridging-header.h -Xfrontend -validate-tbd-against-ir=none -driver-show-incremental -driver-show-job-lifecycle C.swift 2>&1 | %FileCheck -check-prefix MODULE-C %s
3631
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/B.swiftmodule -enable-experimental-cross-module-incremental-build -module-name B -I %t -output-file-map %t/B.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle B.swift 2>&1 | %FileCheck -check-prefix MODULE-B %s
3732
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/A.swiftmodule -enable-experimental-cross-module-incremental-build -module-name A -I %t -output-file-map %t/A.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle A.swift 2>&1 | %FileCheck -check-prefix MODULE-A %s

test/Incremental/CrossModule/linear.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp -r %S/Inputs/linear/* %t
33

4-
// No reason to run these tests on the simulator hosts rdar://70772320
5-
// UNSUPPORTED: CPU=x86_64 && OS=ios
6-
// UNSUPPORTED: CPU=x86_64 && OS=tvos
7-
// UNSUPPORTED: CPU=x86_64 && OS=watchos
8-
// UNSUPPORTED: CPU=i386 && OS=watchos
9-
104
//
115
// This test establishes a "linear" chain of modules that import one another
126
// and ensures that a cross-module incremental build does not needlessly
@@ -31,6 +25,7 @@
3125
//
3226

3327
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/C.swiftmodule -enable-experimental-cross-module-incremental-build -module-name C -I %t -output-file-map %t/C.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle -DNEW C.swift 2>&1 | %FileCheck -check-prefix MODULE-C %s
28+
// RUN: touch %t/C.swiftmodule
3429
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/B.swiftmodule -enable-experimental-cross-module-incremental-build -module-name B -I %t -output-file-map %t/B.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle B.swift 2>&1 | %FileCheck -check-prefix MODULE-B %s
3530
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/A.swiftmodule -enable-experimental-cross-module-incremental-build -module-name A -I %t -output-file-map %t/A.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle A.swift 2>&1 | %FileCheck -check-prefix MODULE-A %s
3631

test/Incremental/CrossModule/transitive.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp -r %S/Inputs/transitive/* %t
33

4-
// No reason to run these tests on the simulator hosts rdar://70772320
5-
// UNSUPPORTED: CPU=x86_64 && OS=ios
6-
// UNSUPPORTED: CPU=x86_64 && OS=tvos
7-
// UNSUPPORTED: CPU=x86_64 && OS=watchos
8-
// UNSUPPORTED: CPU=i386 && OS=watchos
9-
104
//
115
// This test establishes a "transitive" chain of modules that import one another
126
// and ensures that a cross-module incremental build rebuilds all modules
@@ -33,6 +27,7 @@
3327
//
3428

3529
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/C.swiftmodule -enable-experimental-cross-module-incremental-build -module-name C -I %t -output-file-map %t/C.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle -DUSEC -DNEW C.swift 2>&1 | %FileCheck -check-prefix MODULE-C %s
30+
// RUN: touch %t/C.swiftmodule
3631
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/B.swiftmodule -enable-experimental-cross-module-incremental-build -module-name B -I %t -output-file-map %t/B.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle -DUSEC B.swift 2>&1 | %FileCheck -check-prefix MODULE-B %s
3732
// RUN: cd %t && %target-swiftc_driver -c -incremental -emit-dependencies -emit-module -emit-module-path %t/A.swiftmodule -enable-experimental-cross-module-incremental-build -module-name A -I %t -output-file-map %t/A.json -working-directory %t -driver-show-incremental -driver-show-job-lifecycle -DUSEC A.swift 2>&1 | %FileCheck -check-prefix MODULE-A %s
3833

0 commit comments

Comments
 (0)