forked from OSchip/llvm-project
Added support for XTIMEOUT to dosep
Ideally, this would be put in the individual test files. Unfortunately, I'm not sure how to do that quickly/easily. I'm open to suggestions. In the meantime, I'll submit this to stabilze the build server. llvm-svn: 237206
This commit is contained in:
parent
9243c762bb
commit
0638173750
|
@ -24,6 +24,7 @@ or export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=0
|
|||
import multiprocessing
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
|
@ -147,6 +148,34 @@ def walk_and_invoke(test_root, dotest_options, num_threads):
|
|||
|
||||
return (timed_out, failed, passed)
|
||||
|
||||
def getExpectedTimeouts(dotest_options):
|
||||
# returns a set of test filenames that might timeout
|
||||
# are we running against a remote target?
|
||||
m = re.search('\sremote-(\w+)', dotest_options)
|
||||
if m:
|
||||
target = m.group(1)
|
||||
remote = True
|
||||
else:
|
||||
target = sys.platform
|
||||
remote = False
|
||||
|
||||
expected_timeout = set()
|
||||
|
||||
if target.startswith("linux"):
|
||||
expected_timeout |= {
|
||||
"TestAttachResume.py",
|
||||
"TestConnectRemote.py",
|
||||
"TestCreateAfterAttach.py",
|
||||
"TestExitDuringStep.py",
|
||||
"TestThreadStepOut.py",
|
||||
}
|
||||
elif target.startswith("android"):
|
||||
expected_timeout |= {
|
||||
"TestExitDuringStep.py",
|
||||
"TestHelloWorld.py",
|
||||
}
|
||||
return expected_timeout
|
||||
|
||||
def main():
|
||||
# We can't use sys.path[0] to determine the script directory
|
||||
# because it doesn't work under a debugger
|
||||
|
@ -202,6 +231,13 @@ Run lldb test suite using a separate process for each test file.
|
|||
timed_out = set(timed_out)
|
||||
num_tests = len(failed) + len(passed)
|
||||
|
||||
# remove expected timeouts from failures
|
||||
expected_timeout = getExpectedTimeouts(dotest_options)
|
||||
for xtime in expected_timeout:
|
||||
if xtime in timed_out:
|
||||
timed_out.remove(xtime)
|
||||
failed.remove(xtime)
|
||||
|
||||
print "Ran %d tests." % num_tests
|
||||
if len(failed) > 0:
|
||||
failed.sort()
|
||||
|
|
Loading…
Reference in New Issue