Commit Graph

18 Commits

Author SHA1 Message Date
Johnny Chen c13ee52c2f Fixed an error in Debugger::UpdateExecutionContext() where an invalid index ID 0
was used to set the selected thread if none was selected.  Use a more robust
API to accomplish the task.

Also fixed an error found, while investigating, in CommandObjectThreadSelect::
Execute() where the return status was not properly set if successful.

As a result, both the stl step-in test cases with expectedFailure decorators now
passed.

llvm-svn: 113825
2010-09-14 00:53:53 +00:00
Johnny Chen 165a0798a1 Converted TestSTL.py to Dsym/Dwarf combination.
llvm-svn: 113241
2010-09-07 18:27:35 +00:00
Johnny Chen cbb4be0c93 Changed the test case class names to be noun-like instead of verb-like.
llvm-svn: 112732
2010-09-01 19:59:58 +00:00
Johnny Chen 5ee881948a Added a test case test_breakpoint_creation_by_filespec_python() which creates a
breakpoint by FileSpec and line number and exercises some FileSpec APIs.

Also, RUN_STOPPED is a bad assert name, RUN_SUCCEEDED is better.

llvm-svn: 112327
2010-08-27 23:47:36 +00:00
Johnny Chen 9bc867aaf5 Makefile refactoring for the test suite. Added a make directory under test,
which hosts the Makefile.rules and modified most of the Makefiles under each
test case directories to utilize Mekefile.rules.

Added a description of 'make' directory into README-TestSuite file.

llvm-svn: 111868
2010-08-23 23:56:08 +00:00
Johnny Chen d0190a6182 Changed the keyword argument for runCmd()/expect() from 'verbose' to 'trace',
which, defaults to False, and if set to True, will trace lldb command execution
and result.

Added "-t" command option to the test driver dotest.py which sets the
LLDB_COMMAND_TRACE environment variable to "YES" and as a result always turns on
command tracing regardless of the 'trace' keyword argument to runCmd()/expect().

llvm-svn: 111811
2010-08-23 17:10:44 +00:00
Johnny Chen ff3d01d0b7 Print the verbose output of runCmd()/expect() to stderr instead of stdout.
And converted the rest of the test cases to runCmd()/expect().

llvm-svn: 111677
2010-08-20 21:03:09 +00:00
Johnny Chen 0c19186352 Added more informational assert message strings.
llvm-svn: 111536
2010-08-19 18:17:48 +00:00
Johnny Chen 5a2133909d Simplify the assert matched-string criterion.
llvm-svn: 111429
2010-08-18 21:28:35 +00:00
Johnny Chen 6ca006c7c1 Factored the "continue" command execution of the inferior process as part of the
cleanup before finish into the test fixture in lldbtest.TestBase.tearDown().

Derivatives of TestBase is responsible for setting self.runStarted to True if an
inferior process has been started.

llvm-svn: 111188
2010-08-16 21:28:10 +00:00
Johnny Chen 1794184ada Modified the remaining test cases to display more meaningful assert messages.
Added a generic message generator to the lldbtest.py base module.

llvm-svn: 110625
2010-08-09 23:44:24 +00:00
Johnny Chen 73258830f3 o Added unittest2 which has added the new features in unittest for Python 2.7
backported to Python 2.3+.  Some of the features desired include better
  verbose reporting in unittest2.TextTestRunner and decorator support for
  skipping tests and expected failures.

  http://pypi.python.org/pypi/unittest2

o Modified the existing .py tests to use unittest2 and decorated
  TestSTL.test_step_into_stl(), which is known to always fail currently, with
  @unittest2.expectedFailure.

llvm-svn: 110397
2010-08-05 23:42:46 +00:00
Johnny Chen a21249597e When running a single test case, lldb.SBDebugger.Terminate() is not being called
because unittest.main() calls sys.exit() before returning.  Fixed by registering
an exit handler for this situation.

llvm-svn: 110379
2010-08-05 21:23:45 +00:00
Johnny Chen c0599ea1e7 Removed redundant import statement.
llvm-svn: 109803
2010-07-29 20:49:07 +00:00
Johnny Chen ed4377eded Removed debug stmts checked into the previous commit.
llvm-svn: 109712
2010-07-29 00:40:06 +00:00
Johnny Chen 588ddc1c58 Add some comment about possible related bug info.
llvm-svn: 109678
2010-07-28 22:00:42 +00:00
Johnny Chen 377a8ed913 Added a test case to test that we can successfully step into an STL function.
This test case currently always fails.

llvm-svn: 109674
2010-07-28 21:24:31 +00:00
Chris Lattner 30fdc8d841 Initial checkin of lldb code from internal Apple repo.
llvm-svn: 105619
2010-06-08 16:52:24 +00:00