File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+
3
+ # Like /bin/touch, but takes a time using the LLVM epoch.
4
+
5
+ import os
6
+ import sys
7
+
8
+ assert len (sys .argv ) >= 2
9
+ timeVal = int (sys .argv [1 ])
10
+
11
+ timeVal += 946684800 # offset between Unix and LLVM epochs
12
+
13
+ # Update the output file mtime, or create it if necessary.
14
+ # From http://stackoverflow.com/a/1160227.
15
+ for outputFile in sys .argv [1 :]:
16
+ with open (outputFile , 'a' ):
17
+ os .utime (outputFile , (timeVal , timeVal ))
Original file line number Diff line number Diff line change 1
- // rdar://problem/21515673
2
- // REQUIRES: OS=macosx
3
-
4
1
// RUN: rm -rf %t && cp -r %S/Inputs/bindings-build-record/ %t
5
- // RUN: touch -t 201401240005 %t/*
2
+ // RUN: %S/Inputs/ touch.py 443865900 %t/*
6
3
7
4
// 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=MUST-EXEC
8
5
32
29
33
30
// FILE-ADDED: inputs: ["./added.swift"], output: {{[{].*[}]}}, condition: newly-added{{$}}
34
31
35
- // RUN: touch -t 201401240006 %t/main.swift
32
+ // RUN: %S/Inputs/ touch.py 443865960 %t/main.swift
36
33
// 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
34
// BUILD-RECORD-PLUS-CHANGE: inputs: ["./main.swift"], output: {{[{].*[}]}}, condition: run-without-cascading
38
35
// BUILD-RECORD-PLUS-CHANGE: inputs: ["./other.swift"], output: {{[{].*[}]}}, condition: run-without-cascading{{$}}
39
36
// BUILD-RECORD-PLUS-CHANGE: inputs: ["./yet-another.swift"], output: {{[{].*[}]$}}
40
37
41
- // RUN: touch -t 201401240005 %t/main.swift
38
+ // RUN: %S/Inputs/ touch.py 443865900 %t/*
42
39
// 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
40
// FILE-REMOVED: inputs: ["./main.swift"], output: {{[{].*[}]}}, condition: run-without-cascading
44
41
// FILE-REMOVED: inputs: ["./other.swift"], output: {{[{].*[}]}}, condition: run-without-cascading
You can’t perform that action at this time.
0 commit comments