summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-perf/lib/TestCase.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-04-02 21:31:18 +0000
committerEnrico Granata <egranata@apple.com>2013-04-02 21:31:18 +0000
commit4e969282fd60e439149ac8e58b39eb60495758d8 (patch)
tree8d1b412a78d52d6a1f45ea1e0c6c52a692862a64 /lldb/tools/lldb-perf/lib/TestCase.cpp
parentd83bfce6d48d5f1c99198ce8106129bfd7a4ea2a (diff)
downloadbcm5719-llvm-4e969282fd60e439149ac8e58b39eb60495758d8.tar.gz
bcm5719-llvm-4e969282fd60e439149ac8e58b39eb60495758d8.zip
Misc fixes:
- make an overload of Launch() that takes an init list of const char* if all you need to tweak in the launch info are the command-line arguments - make Run() return an int that you can use as an exit-code - make dynamic values work properly when recursing in FetchVariables() - make the po output more obvious in verbose mode llvm-svn: 178578
Diffstat (limited to 'lldb/tools/lldb-perf/lib/TestCase.cpp')
-rw-r--r--lldb/tools/lldb-perf/lib/TestCase.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lldb/tools/lldb-perf/lib/TestCase.cpp b/lldb/tools/lldb-perf/lib/TestCase.cpp
index c4b01998c23..ac8c402ac8b 100644
--- a/lldb/tools/lldb-perf/lib/TestCase.cpp
+++ b/lldb/tools/lldb-perf/lib/TestCase.cpp
@@ -117,6 +117,15 @@ TestCase::Launch (lldb::SBLaunchInfo &launch_info)
return false;
}
+bool
+TestCase::Launch (std::initializer_list<const char*> args)
+{
+ std::vector<const char*> args_vect(args);
+ args_vect.push_back(NULL);
+ lldb::SBLaunchInfo launch_info((const char**)&args_vect[0]);
+ return Launch(launch_info);
+}
+
void
TestCase::SetVerbose (bool b)
{
@@ -296,7 +305,7 @@ TestCase::Loop ()
if (GetVerbose()) printf("I am gonna die at step %d\n",m_step);
}
-void
+int
TestCase::Run (TestCase& test, int argc, const char** argv)
{
if (test.Setup(argc, argv))
@@ -304,6 +313,9 @@ TestCase::Run (TestCase& test, int argc, const char** argv)
test.Loop();
Results results;
test.WriteResults(results);
+ return RUN_SUCCESS;
}
+ else
+ return RUN_SETUP_ERROR;
}
OpenPOWER on IntegriCloud