Skip to content

Commit f83bd28

Browse files
committed
tests: fix the timeout.py script and move it to a more central place
A string->float conversion for the command line argument was missing
1 parent 1de19a1 commit f83bd28

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/stdlib/timeout.py renamed to test/Inputs/timeout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def watchdog(command, timeout=None):
1616

1717

1818
if __name__ == '__main__':
19-
watchdog(sys.argv[2:], timeout=sys.argv[1])
19+
watchdog(sys.argv[2:], timeout=float(sys.argv[1]))

test/stdlib/Reflection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -o %t/a.out
33
// RUN: %target-codesign %t/a.out
4-
// RUN: %{python} %S/timeout.py 360 %target-run %t/a.out | %FileCheck %s
4+
// RUN: %{python} %S/../Inputs/timeout.py 360 %target-run %t/a.out | %FileCheck %s
55
// REQUIRES: executable_test
66
// FIXME: timeout wrapper is necessary because the ASan test runs for hours
77

test/stdlib/Reflection_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %target-clang %S/Inputs/Mirror/Mirror.mm -c -o %t/Mirror.mm.o -g
44
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o -o %t/a.out
55
// RUN: %target-codesign %t/a.out
6-
// RUN: %{python} %S/timeout.py 360 %target-run %t/a.out %S/Inputs/shuffle.jpg | %FileCheck %s
6+
// RUN: %{python} %S/../Inputs/timeout.py 360 %target-run %t/a.out %S/Inputs/shuffle.jpg | %FileCheck %s
77
// FIXME: timeout wrapper is necessary because the ASan test runs for hours
88

99
// REQUIRES: executable_test

0 commit comments

Comments
 (0)