Skip to content

Commit ccf267b

Browse files
author
David Ungar
authored
Merge pull request #38356 from davidungar/fix-test-for-new-driver
[Incremental Imports] Fix tests to avoid priors modTime changes
2 parents b7ccf1b + 403159c commit ccf267b

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

test/Driver/Dependencies/independent-fine.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: rdar80485272
21
// main | other
32

43
// RUN: %empty-directory(%t)
@@ -15,7 +14,8 @@
1514

1615
// CHECK-SECOND-NOT: Handled
1716

18-
// RUN: touch -t 201401240006 %t/*
17+
// Don't change the priors mod time.
18+
// RUN: touch -t 201401240006 %t/*.{swift,swiftdeps,json}
1919
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s
2020

2121
// RUN: touch -t 201401240007 %t/main.swift
@@ -33,7 +33,8 @@
3333

3434
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s
3535

36-
// RUN: touch -t 201401240006 %t/*
36+
// Don't change the priors mod time.
37+
// RUN: touch -t 201401240006 %t/*.{swift,swiftdeps,json}
3738
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST-MULTI %s
3839

3940

test/Driver/Dependencies/independent-parseable-fine.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: rdar80485272
21
// RUN: %empty-directory(%t)
32
// RUN: cp -r %S/Inputs/independent-fine/* %t
43
// RUN: touch -t 201401240005 %t/*
@@ -26,7 +25,8 @@
2625
// CHECK-SECOND-DAG: "{{(.\\/)?}}main.swift"
2726
// CHECK-SECOND: {{^}$}}
2827

29-
// RUN: touch -t 201401240006 %t/*
28+
// Don't mess with the priors
29+
// RUN: touch -t 201401240006 %t/*.{swift,swiftdeps,json}
3030
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s
3131

3232

@@ -74,6 +74,6 @@
7474
// CHECK-SECOND-MULTI-DAG: "{{(.\\/)?}}other.swift"
7575
// CHECK-SECOND-MULTI: {{^}$}}
7676

77-
// RUN: touch -t 201401240006 %t/*
77+
// RUN: touch -t 201401240006 %t/*.{swift,swiftdeps,json}
7878
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -parseable-output 2>&1 | %FileCheck -check-prefix=CHECK-FIRST-MULTI %s
7979

test/Driver/Dependencies/one-way-external-delete-fine.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: rdar80485272
21
// RUN: %empty-directory(%t)
32
// RUN: cp -r %S/Inputs/one-way-external-fine/* %t
43
// RUN: touch -t 201401240005 %t/*
@@ -14,7 +13,8 @@
1413
// CHECK-SECOND-NOT: Handled
1514

1615

17-
// RUN: touch -t 201401240005 %t/*
16+
// Don't change the .priors mod time
17+
// RUN: touch -t 201401240005 %t/*{swift,swiftdeps,json}
1818
// RUN: touch -t 201401240006 %t/*.o
1919
// RUN: touch -t 201401240004 %t/*-external
2020
// RUN: rm %t/other1-external
@@ -31,7 +31,8 @@
3131
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s
3232

3333

34-
// RUN: touch -t 201401240005 %t/*
34+
// Don't change the .priors mod time
35+
// RUN: touch -t 201401240005 %t/*{swift,swiftdeps,json}
3536
// RUN: touch -t 201401240006 %t/*.o
3637
// RUN: touch -t 201401240004 %t/*-external
3738
// RUN: rm %t/main1-external

test/Driver/Dependencies/one-way-external-fine.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: rdar80485272
21
/// other ==> main
32
/// "./main1-external" ==> main
43
/// "./main2-external" ==> main
@@ -19,8 +18,8 @@
1918

2019
// CHECK-SECOND-NOT: Handled
2120

22-
23-
// RUN: touch -t 201401240005 %t/*
21+
// Don't change the .priors mod time
22+
// RUN: touch -t 201401240005 %t/*{swift,swiftdeps,json}
2423
// RUN: touch -t 201401240006 %t/*.o
2524
// RUN: touch -t 201401240004 %t/*-external
2625
// RUN: touch -t 203704010005 %t/other1-external
@@ -29,14 +28,16 @@
2928
// CHECK-THIRD-DAG: Handled other.swift
3029
// CHECK-THIRD-DAG: Handled main.swift
3130

32-
// RUN: touch -t 201401240005 %t/*
31+
// Don't change the .priors mod time
32+
// RUN: touch -t 201401240005 %t/*{swift,swiftdeps,json}
3333
// RUN: touch -t 201401240006 %t/*.o
3434
// RUN: touch -t 201401240004 %t/*-external
3535
// RUN: touch -t 203704010005 %t/other2-external
3636
// RUN: cd %t && %swiftc_driver -c -driver-use-frontend-path "%{python.unquoted};%S/Inputs/update-dependencies.py;%swift-dependency-tool" -output-file-map %t/output.json -incremental -driver-always-rebuild-dependents ./main.swift ./other.swift -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-THIRD %s
3737

3838

39-
// RUN: touch -t 201401240005 %t/*
39+
// Don't change the .priors mod time
40+
// RUN: touch -t 201401240005 %t/*{swift,swiftdeps,json}
4041
// RUN: touch -t 201401240006 %t/*.o
4142
// RUN: touch -t 201401240004 %t/*-external
4243
// RUN: touch -t 203704010005 %t/main1-external
@@ -46,7 +47,8 @@
4647
// CHECK-FOURTH: Handled main.swift
4748
// CHECK-FOURTH-NOT: Handled other.swift
4849

49-
// RUN: touch -t 201401240005 %t/*
50+
// Don't change the .priors mod time
51+
// RUN: touch -t 201401240005 %t/*{swift,swiftdeps,json}
5052
// RUN: touch -t 201401240006 %t/*.o
5153
// RUN: touch -t 201401240004 %t/*-external
5254
// RUN: touch -t 203704010005 %t/main2-external

0 commit comments

Comments
 (0)