Skip to content

Commit edfaba4

Browse files
committed
[android] Mark large_string_array as unsupported in Android-ARMv7
Seems that the test takes more than 5 minutes to finish, so the timeout is triggered. Remove the test from the supported set for Android-ARMv7. Instead of using XFAIL, use UNSUPPORTED to avoid spending 5 minutes waiting for the timeout to occur. I don't think a lot of people will be able to spend time to find out what's happening in a niche platform. To make more clear what was happening, include a message if the timeout.py script actually times out. Otherwise the error is a cryptic "FileCheck error: '-' is empty.". Also fix the shebang and import the print function from __future__ to avoid using the old print-chevron.
1 parent 763875a commit edfaba4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

test/Inputs/timeout.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/uar/bin/env python
1+
#!/usr/bin/env python
2+
3+
from __future__ import print_function
24

35
import subprocess
46
import sys
@@ -7,7 +9,12 @@
79

810
def watchdog(command, timeout=None):
911
process = subprocess.Popen(command)
10-
timer = threading.Timer(timeout, process.kill)
12+
13+
def process_kill():
14+
process.kill()
15+
print("Timeout!", file=sys.stderr)
16+
17+
timer = threading.Timer(timeout, process_kill)
1118
try:
1219
timer.start()
1320
process.communicate()

validation-test/SILOptimizer/large_string_array.swift.gyb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
1212
// REQUIRES: long_test
1313

14+
// Android-ARMv7 takes more than 5 minutes. Mark it as unsupported to avoid
15+
// wasting 5 minutes until timing out.
16+
// UNSUPPORTED: CPU=armv7 && OS=linux-androideabi
17+
1418
// Check if the optimizer can optimize the whole array into a statically
1519
// initialized global
1620

0 commit comments

Comments
 (0)