Commit Graph

1526 Commits

Author SHA1 Message Date
Johnny Chen 0e38f42f0a Test that breakpoint works correctly in the presence of dead-code stripping.
llvm-svn: 107719
2010-07-06 22:52:00 +00:00
Johnny Chen f02ec12796 Make it fail fast if 'mydir' attribute is not overridden by subclasses of
lldbtest.TestBase.

Also removed some debug prints.

llvm-svn: 107575
2010-07-03 20:41:42 +00:00
Johnny Chen bf6ffa3b89 Abstracted the lldb-specific unittest.TestCase.setUp()/tearDown() in a separate
module lldbtest.py and refactored the existing test cases to derive from the
abstract base class lldbtest.TestBase.

MOdified the test driver (dotest.py and dotest.pl) to set up additional
PYTHONPATH component for locating the lldbtest module, which sits in the same
directory.

llvm-svn: 107563
2010-07-03 03:41:59 +00:00
Johnny Chen f1d2ac7c01 Test variable with function ptr type and that break on the function works.
llvm-svn: 107545
2010-07-02 23:50:37 +00:00
Johnny Chen 03813ec687 Also verified the values of global variables.
llvm-svn: 107525
2010-07-02 22:12:25 +00:00
Johnny Chen 85d6948f3d Add a test to show global variables and to verify that they do display as having
global scopes.

llvm-svn: 107522
2010-07-02 22:04:42 +00:00
Johnny Chen c653d4c574 Fixed logic error; checking return status and raising exception should only be
done if the environment variable LLDB_LOG is defined.

llvm-svn: 107508
2010-07-02 20:35:23 +00:00
Johnny Chen 3d7e687245 A dumber way to invoke the test suite.
Use this script to visit each python test case under the specified directory and
run python unittest.main() on each test case.

llvm-svn: 107447
2010-07-01 23:01:23 +00:00
Johnny Chen 119b53ea6d Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is
is defined.  Use ${LLDB_LOG} to specify the log file.

Create a singleton SBDebugger in the lldb namespace, that gets used when running
the entire test suite.

llvm-svn: 107445
2010-07-01 22:52:57 +00:00
Johnny Chen 79046273dd Removed most of the time delay introduced in the test scripts.
Left some and added some print statements for debugging purpose.

llvm-svn: 107386
2010-07-01 05:31:44 +00:00
Johnny Chen 8c3f9187f9 Added some delay (100 ms) after executing each 'command interpreter' command;
this seems to alleviate the intermittent failure observed while running the
whole test suite.

llvm-svn: 107357
2010-07-01 00:18:39 +00:00
Johnny Chen 41a2ad5f85 Added comments.
llvm-svn: 107333
2010-06-30 22:22:37 +00:00
Johnny Chen 6ea3fc5a9f Added TestClassTypes.py to test setting a breakpoint on a class constructor and
do 'variable list this' command when stopped.

Applied some cleanup on TestArrayTypes.py.  In particular, specify the absolute
path to the object file in order not to confuse the debugger.

llvm-svn: 107330
2010-06-30 22:16:25 +00:00
Johnny Chen 20faefd329 Fixed a typo.
llvm-svn: 107318
2010-06-30 20:43:35 +00:00
Johnny Chen 94a6899e23 Add some delay before calling SBDebugger.Terminate().
llvm-svn: 107221
2010-06-29 23:17:15 +00:00
Johnny Chen cb9b857959 Added TestArrayTypes.py for test/array_types directory.
Also modified dotest.py so that it sets the LLDB_TEST environment variable
so that individual test cases can locate their supporting files correctly.

llvm-svn: 107220
2010-06-29 23:10:39 +00:00
Johnny Chen 4657be6e63 For the time being, let's bracket the test runner within the
lldb.SBDebugger.Initialize()/Terminate() pair.

Change TestHelp.py to use synchronous debugging, which is easier to work with.

llvm-svn: 107198
2010-06-29 19:44:16 +00:00
Johnny Chen 7e363f5571 Added test for a previously fixed bug where invoking lldb command from an emacs
shell and issuing 'help' would hang (was actually infinitely looping).

llvm-svn: 107066
2010-06-28 20:55:57 +00:00
Johnny Chen c43d789a38 No need to add the test script containing directory to sys.path more than once.
llvm-svn: 106929
2010-06-26 00:19:32 +00:00
Johnny Chen 6d436d63ff Removed debug print statements.
llvm-svn: 106913
2010-06-25 23:34:17 +00:00
Johnny Chen f94c8c2bf9 Use lldb.SBDebugger.Create() factory method to create an instance first.
llvm-svn: 106910
2010-06-25 23:22:48 +00:00
Johnny Chen 9320d4ab60 A simple test of 'help' command and its output.
llvm-svn: 106909
2010-06-25 23:15:47 +00:00
Johnny Chen a765c28db3 A simple testing framework for lldb using python's unit testing framework.
Tests for lldb are written as python scripts which take advantage of the script
bridging provided by LLDB.framework to interact with lldb core.

A specific naming pattern is followed by the .py script to be recognized as
a module which implements a test scenario, namely, Test*.py.

To specify the directories where "Test*.py" python test scripts are located,
you need to pass in a list of directory names.  By default, the current
working directory is searched if nothing is specified on the command line.

An example:

[14:10:20] johnny:/Volumes/data/lldb/svn/trunk/test $ ./dotest.py -v example
test_choice (TestSequenceFunctions.TestSequenceFunctions) ... ok
test_sample (TestSequenceFunctions.TestSequenceFunctions) ... ok
test_shuffle (TestSequenceFunctions.TestSequenceFunctions) ... ok

----------------------------------------------------------------------
Ran 3 tests in 0.000s

OK

llvm-svn: 106890
2010-06-25 21:14:08 +00:00
Johnny Chen 7c3f7fee41 Left a debug statement in the previous checkin.
llvm-svn: 106510
2010-06-22 00:13:20 +00:00
Johnny Chen a02199f5e7 Remove stale reference to the lldb path component.
llvm-svn: 106509
2010-06-22 00:11:26 +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