[Lldb-commits] [lldb] r118860 - in /lldb/trunk/test: lldbtest.py plugins/darwin.py

Johnny Chen johnny.chen at apple.com
Thu Nov 11 15:54:12 PST 2010


Author: johnny
Date: Thu Nov 11 17:54:12 2010
New Revision: 118860

URL: http://llvm.org/viewvc/llvm-project?rev=118860&view=rev
Log:
The session log entry containing the command to rerun the same test now also includes
the architecture and compiler specs.

Modified:
    lldb/trunk/test/lldbtest.py
    lldb/trunk/test/plugins/darwin.py

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=118860&r1=118859&r2=118860&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Nov 11 17:54:12 2010
@@ -576,8 +576,9 @@
             print >> f, "Session info generated @", datetime.datetime.now().ctime()
             print >> f, self.session.getvalue()
             print >> f, "To rerun this test, issue the following command from the 'test' directory:\n"
-            print >> f, "./dotest.py -v -t -f %s.%s" % (self.__class__.__name__,
-                                                        self._testMethodName)
+            print >> f, "%s ./dotest.py -v -t -f %s.%s" % (self.getRunSpec(),
+                                                           self.__class__.__name__,
+                                                           self._testMethodName)
 
     def setTearDownCleanup(self, dictionary=None):
         """Register a cleanup action at tearDown() time with a dictinary"""
@@ -807,6 +808,12 @@
             # End of while loop.
 
 
+    def getRunSpec(self):
+        """Environment variable spec to run this test again, invoked from within
+        dumpSessionInfo()."""
+        module = __import__(sys.platform)
+        return module.getRunSpec()        
+
     def buildDefault(self, architecture=None, compiler=None, dictionary=None):
         """Platform specific way to build the default binaries."""
         module = __import__(sys.platform)

Modified: lldb/trunk/test/plugins/darwin.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/plugins/darwin.py?rev=118860&r1=118859&r2=118860&view=diff
==============================================================================
--- lldb/trunk/test/plugins/darwin.py (original)
+++ lldb/trunk/test/plugins/darwin.py Thu Nov 11 17:54:12 2010
@@ -17,6 +17,11 @@
 
 #print "Hello, darwin plugin!"
 
+def getRunSpec():
+    """Environment variable spec to run this test again, invoked from within
+    dumpSessionInfo()."""
+    return "%s%s" % (getArchSpec(None), getCCSpec(None))
+
 def getArchSpec(architecture):
     """
     Helper function to return the key-value string to specify the architecture





More information about the lldb-commits mailing list