From 6d2cfb80ba239ed47d962d7dd2487c168082c531 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 19 Jun 2013 21:48:09 +0000 Subject: [PATCH] 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 llvm-svn: 184363 --- lldb/test/dotest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py index 4c91a4a0912d..2d6f0b55ac3c 100755 --- a/lldb/test/dotest.py +++ b/lldb/test/dotest.py @@ -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 else 1): 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(failuresPerCategory) > 0: 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")