[Lldb-commits] [lldb] r142562 - /lldb/trunk/test/lldbbench.py

Johnny Chen johnny.chen at apple.com
Wed Oct 19 18:35:57 PDT 2011


Author: johnny
Date: Wed Oct 19 20:35:57 2011
New Revision: 142562

URL: http://llvm.org/viewvc/llvm-project?rev=142562&view=rev
Log:
Up until now, we have been using pexpect to spawn an lldb process and use lldb commands to
bring the debugger to the desired state.

This patch makes BenchBase inherit from TestBase, instead of Base (which is a parent class of
TestBase).  This is so that we can also enjoy the Pythonic way of bringing the lldb debugger
to a desired state before running the benchmark and collect statistics.

Modified:
    lldb/trunk/test/lldbbench.py

Modified: lldb/trunk/test/lldbbench.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbbench.py?rev=142562&r1=142561&r2=142562&view=diff
==============================================================================
--- lldb/trunk/test/lldbbench.py (original)
+++ lldb/trunk/test/lldbbench.py Wed Oct 19 20:35:57 2011
@@ -1,7 +1,5 @@
 import time
-from lldbtest import Base
-from lldbtest import benchmarks_test
-from lldbtest import line_number
+from lldbtest import *
 
 class Stopwatch(object):
     """Stopwatch provides a simple utility to start/stop your stopwatch multiple
@@ -85,17 +83,19 @@
                                                                self.__laps__,
                                                                self.__total_elapsed__)
 
-class BenchBase(Base):
+class BenchBase(TestBase):
     """
     Abstract base class for benchmark tests.
     """
     def setUp(self):
         """Fixture for unittest test case setup."""
-        Base.setUp(self)
+        super(BenchBase, self).setUp()
+        #TestBase.setUp(self)
         self.stopwatch = Stopwatch()
 
     def tearDown(self):
         """Fixture for unittest test case teardown."""
-        Base.tearDown(self)
+        super(BenchBase, self).setUp()
+        #TestBase.tearDown(self)
         del self.stopwatch
 





More information about the lldb-commits mailing list