File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 15
15
#
16
16
# ----------------------------------------------------------------------------
17
17
18
+ import glob
18
19
import os
19
20
import sys
20
21
23
24
24
25
# Update the output file mtime, or create it if necessary.
25
26
# From http://stackoverflow.com/a/1160227.
26
- for outputFile in sys .argv [2 :]:
27
- with open (outputFile , 'a' ):
28
- os .utime (outputFile , (timeVal , timeVal ))
27
+ for filePathPattern in sys .argv [2 :]:
28
+ # Support glob patterns if the shell did not expand them (like cmd.exe)
29
+ for filePath in glob .glob (filePathPattern ):
30
+ with open (filePath , 'a' ):
31
+ os .utime (filePath , (timeVal , timeVal ))
Original file line number Diff line number Diff line change 2
2
3
3
// RUN: %empty-directory(%t)
4
4
// RUN: cp -r %S/Inputs/one-way-fine/* %t
5
- // RUN: touch -t 201401240005 %t/*
5
+ // RUN: %{python} %S/Inputs/touch.py 201401240005 %t/*
6
6
7
7
// RUN: cd %t && %swiftc_driver -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 -emit-module-path %t/master.swiftmodule -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-FIRST %s
8
8
12
12
// CHECK-FIRST-DAG: Produced master.swiftmodule
13
13
14
14
// swift-driver checks existence of all outputs
15
- // RUN: touch -t 201401240006 %t/*.swiftmodule
16
- // RUN: touch -t 201401240006 %t/*.swiftdoc
17
- // RUN: touch -t 201401240006 %t/*.swiftsourceinfo
15
+ // RUN: %{python} %S/Inputs/touch.py 201401240006 %t/*.swiftmodule
16
+ // RUN: %{python} %S/Inputs/touch.py 201401240006 %t/*.swiftdoc
17
+ // RUN: %{python} %S/Inputs/touch.py 201401240006 %t/*.swiftsourceinfo
18
18
19
19
// RUN: cd %t && %swiftc_driver -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 -emit-module-path %t/master.swiftmodule -module-name main -j1 -v 2>&1 | %FileCheck -check-prefix=CHECK-SECOND %s
20
20
You can’t perform that action at this time.
0 commit comments