diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-08-11 00:16:28 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-08-11 00:16:28 +0000 |
commit | 8082a00dcbd9f7860b9a08cd76c4f7698f35cd31 (patch) | |
tree | a6541f1855749f0903b4863862085f3d44ea875b | |
parent | 173864b36c6583a07230dbbcf66ca8e94fe360f1 (diff) | |
download | bcm5719-llvm-8082a00dcbd9f7860b9a08cd76c4f7698f35cd31.tar.gz bcm5719-llvm-8082a00dcbd9f7860b9a08cd76c4f7698f35cd31.zip |
When a benchmarks test fails, the re-run command should include the '+b' option instead of the '-t' option.
llvm-svn: 137285
-rw-r--r-- | lldb/test/lldbtest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 26c63eb4878..1ce5b900d5a 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -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) |