[Lldb-commits] [lldb] r237206 - Added support for XTIMEOUT to dosep

Vince Harron vince at nethacker.com
Tue May 12 16:10:37 PDT 2015


Author: vharron
Date: Tue May 12 18:10:36 2015
New Revision: 237206

URL: http://llvm.org/viewvc/llvm-project?rev=237206&view=rev
Log:
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.


Modified:
    lldb/trunk/test/dosep.py

Modified: lldb/trunk/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=237206&r1=237205&r2=237206&view=diff
==============================================================================
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Tue May 12 18:10:36 2015
@@ -24,6 +24,7 @@ or    export LLDB_TESTCONCURRENTEVENTS_T
 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_op
 
     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 pro
     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()





More information about the lldb-commits mailing list