The session log entry containing the command to rerun the same test now also includes

the architecture and compiler specs.

llvm-svn: 118860
This commit is contained in:
Johnny Chen 2010-11-11 23:54:12 +00:00
parent 20b6fd7d5d
commit 285371e32a
2 changed files with 14 additions and 2 deletions

View File

@ -576,7 +576,8 @@ class TestBase(unittest2.TestCase):
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__,
print >> f, "%s ./dotest.py -v -t -f %s.%s" % (self.getRunSpec(),
self.__class__.__name__,
self._testMethodName)
def setTearDownCleanup(self, dictionary=None):
@ -807,6 +808,12 @@ class TestBase(unittest2.TestCase):
# 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)

View File

@ -17,6 +17,11 @@ import lldbtest
#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