diff options
author | Enrico Granata <egranata@apple.com> | 2013-03-20 22:42:34 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-03-20 22:42:34 +0000 |
commit | e16dfcdb5bcb1d0e6ce2c585482ed457213bf1ea (patch) | |
tree | fbe5842a8931c7a5fee42baa67ffb923b3177a37 /lldb/tools/lldb-perf/lib/TestCase.cpp | |
parent | 5bfa4f8eb82585ea7a2ec049ba67592c1092a417 (diff) | |
download | bcm5719-llvm-e16dfcdb5bcb1d0e6ce2c585482ed457213bf1ea.tar.gz bcm5719-llvm-e16dfcdb5bcb1d0e6ce2c585482ed457213bf1ea.zip |
Making the test step count a member variable so that it can be accessed easily
llvm-svn: 177594
Diffstat (limited to 'lldb/tools/lldb-perf/lib/TestCase.cpp')
-rw-r--r-- | lldb/tools/lldb-perf/lib/TestCase.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/tools/lldb-perf/lib/TestCase.cpp b/lldb/tools/lldb-perf/lib/TestCase.cpp index ac8a4c47b95..ba4da6b7217 100644 --- a/lldb/tools/lldb-perf/lib/TestCase.cpp +++ b/lldb/tools/lldb-perf/lib/TestCase.cpp @@ -17,7 +17,8 @@ TestCase::TestCase () : m_process(), m_thread(), m_listener(), - m_verbose(false) + m_verbose(false), + m_step(0) { SBDebugger::Initialize(); SBHostOS::ThreadCreated ("<lldb-tester.app.main>"); @@ -61,7 +62,6 @@ TestCase::GetVerbose () void TestCase::Loop () { - int step = 0; SBEvent evt; while (true) { @@ -152,10 +152,10 @@ TestCase::Loop () exit(1); } if (m_verbose) - printf("RUNNING STEP %d\n",step); + printf("RUNNING STEP %d\n",m_step); ActionWanted action; - TestStep(step, action); - step++; + TestStep(m_step, action); + m_step++; SBError err; switch (action.type) { @@ -166,7 +166,7 @@ TestCase::Loop () if (action.thread.IsValid() == false) { if (m_verbose) Xcode::RunCommand(m_debugger,"bt all",true); - if (m_verbose) printf("[finish invalid] I am gonna die at step %d\n",step); + if (m_verbose) printf("[finish invalid] I am gonna die at step %d\n",m_step); exit(501); } m_process.SetSelectedThread(action.thread); @@ -176,7 +176,7 @@ TestCase::Loop () if (action.thread.IsValid() == false) { if (m_verbose) Xcode::RunCommand(m_debugger,"bt all",true); - if (m_verbose) printf("[next invalid] I am gonna die at step %d\n",step); + if (m_verbose) printf("[next invalid] I am gonna die at step %d\n",m_step); exit(500); } m_process.SetSelectedThread(action.thread); @@ -190,7 +190,7 @@ TestCase::Loop () } } } - if (GetVerbose()) printf("I am gonna die at step %d\n",step); + if (GetVerbose()) printf("I am gonna die at step %d\n",m_step); } void |