[Lldb-commits] [lldb] r133092 - in /lldb/trunk/test: hello_world/TestHelloWorld.py lldbtest.py

Johnny Chen johnny.chen at apple.com
Wed Jun 15 14:38:40 PDT 2011


Author: johnny
Date: Wed Jun 15 16:38:39 2011
New Revision: 133092

URL: http://llvm.org/viewvc/llvm-project?rev=133092&view=rev
Log:
Simplify the base test class.  Remove keyword argument setCookie from TestBase.runCmd() and
remove the self.runStarted attribute since the automatic shutdown of processes associated
with the targets are now performed automatically.

Modified:
    lldb/trunk/test/hello_world/TestHelloWorld.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/hello_world/TestHelloWorld.py?rev=133092&r1=133091&r2=133092&view=diff
==============================================================================
--- lldb/trunk/test/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/hello_world/TestHelloWorld.py Wed Jun 15 16:38:39 2011
@@ -60,7 +60,7 @@
             #self.breakAfterLaunch(process, "main")
         else:
             # On the other hand, the following line of code are more reliable.
-            self.runCmd("run", setCookie=False)
+            self.runCmd("run")
 
         self.process = target.GetProcess()
         self.assertTrue(self.process, PROCESS_IS_VALID)

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=133092&r1=133091&r2=133092&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Jun 15 16:38:39 2011
@@ -403,12 +403,6 @@
     # The concrete subclass should override this attribute.
     mydir = None
 
-    # State pertaining to the inferior process, if any.
-    # This reflects inferior process started through the command interface with
-    # either the lldb "run" or "process launch" command.
-    # See also self.runCmd().
-    runStarted = False
-
     # Maximum allowed attempts when launching the inferior process.
     # Can be overridden by the LLDB_MAX_LAUNCH_COUNT environment variable.
     maxLaunchCount = 3;
@@ -738,7 +732,7 @@
         # Decide whether to dump the session info.
         self.dumpSessionInfo()
 
-    def runCmd(self, cmd, msg=None, check=True, trace=False, setCookie=True):
+    def runCmd(self, cmd, msg=None, check=True, trace=False):
         """
         Ask the command interpreter to handle the command and then check its
         return status.
@@ -772,10 +766,6 @@
                 with recording(self, True) as sbuf:
                     print >> sbuf, "Command '" + cmd + "' failed!"
 
-        # Modify runStarted only if "run" or "process launch" was encountered.
-        if running:
-            self.runStarted = running and setCookie
-
         if check:
             self.assertTrue(self.res.Succeeded(),
                             msg if msg else CMD_MSG(cmd))





More information about the lldb-commits mailing list