[Lldb-commits] [lldb] r184363 - Huge speedup for testsuite categories

Enrico Granata egranata at apple.com
Wed Jun 19 14:48:09 PDT 2013


Author: enrico
Date: Wed Jun 19 16:48:09 2013
New Revision: 184363

URL: http://llvm.org/viewvc/llvm-project?rev=184363&view=rev
Log:
Huge speedup for testsuite categories
This ensures that we won't try to do cleanups of test cases that we are skipping
e.g. this brings down the time required to run the cmdline category on my machine from ~70s to ~30s


Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=184363&r1=184362&r2=184363&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Wed Jun 19 16:48:09 2013
@@ -1204,6 +1204,7 @@ if not noHeaders:
 
 if not os.path.isdir(sdir_name):
     os.mkdir(sdir_name)
+where_to_save_session = os.getcwd()
 fname = os.path.join(sdir_name, "TestStarted")
 with open(fname, "w") as f:
     print >> f, "Test started at: %s\n" % timestamp_started
@@ -1450,6 +1451,8 @@ for ia in range(len(archs) if iterArchs
             def hardMarkAsSkipped(self,test):
                 getattr(test, test._testMethodName).__func__.__unittest_skip__ = True
                 getattr(test, test._testMethodName).__func__.__unittest_skip_why__ = "test case does not fall in any category of interest for this run"
+                test.__class__.__unittest_skip__ = True
+                test.__class__.__unittest_skip_why__ = "test case does not fall in any category of interest for this run"
 
             def startTest(self, test):
                 if self.shouldSkipBecauseOfCategories(test):
@@ -1564,6 +1567,7 @@ if useCategories and len(failuresPerCate
     for category in failuresPerCategory:
         sys.stderr.write("%s - %d\n" % (category,failuresPerCategory[category]))
 
+os.chdir(where_to_save_session)
 fname = os.path.join(sdir_name, "TestFinished")
 with open(fname, "w") as f:
     print >> f, "Test finished at: %s\n" % datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")





More information about the lldb-commits mailing list