When dumping the session log for a failed/errored test, also emit the command to

invoke the test driver to rerun the very same test.  Example output:

/Volumes/data/lldb/svn/trunk/test $ tail 2010-11-09-14_51_34/ExpectedFailure-TestSettings.SettingsCommandTestCase.test_set_output_path.log 

Traceback (most recent call last):
  File "/Volumes/data/lldb/svn/trunk/test/settings/TestSettings.py", line 136, in test_set_output_path
    "'stdout.txt' exists due to target.process.output-path.")
AssertionError: False is not True : 'stdout.txt' exists due to target.process.output-path.


To rerun this test, issue the following command from the 'test' directory:

./dotest.py -v -t -f SettingsCommandTestCase.test_set_output_path

llvm-svn: 118646
This commit is contained in:
Johnny Chen 2010-11-09 22:56:12 +00:00
parent 33048f069f
commit 07569be70c

View File

@ -572,6 +572,9 @@ class TestBase(unittest2.TestCase):
import datetime
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)
def setTearDownCleanup(self, dictionary=None):
"""Register a cleanup action at tearDown() time with a dictinary"""