When a benchmarks test fails, the re-run command should include the '+b' option instead of the '-t' option.

llvm-svn: 137285
This commit is contained in:
Johnny Chen 2011-08-11 00:16:28 +00:00
parent 173864b36c
commit 8082a00dcb
1 changed files with 8 additions and 1 deletions

View File

@ -701,6 +701,12 @@ class Base(unittest2.TestCase):
if test is self:
print >> self.session, traceback
testMethod = getattr(self, self._testMethodName)
if getattr(testMethod, "__benchmarks_test__", False):
benchmarks = True
else:
benchmarks = False
dname = os.path.join(os.environ["LLDB_TEST"],
os.environ["LLDB_SESSION_DIRNAME"])
if not os.path.isdir(dname):
@ -711,7 +717,8 @@ class Base(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 %s -v -t -f %s.%s" % (self.getRunOptions(),
print >> f, "./dotest.py %s -v %s -f %s.%s" % (self.getRunOptions(),
('+b' if benchmarks else '-t'),
self.__class__.__name__,
self._testMethodName)