summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbtest.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Added TestHelloWorld.py which exercises the Python APIs for target, breakpoint,Johnny Chen2010-08-271-10/+33
| | | | | | | and process. Added comment within the file about issues of using LaunchProcess of SBTarget to launch a process (rdar://problem/8364687). llvm-svn: 112276
* Added a test case to bitfields which uses the Python APIs from lldb.py.Johnny Chen2010-08-271-0/+18
| | | | | | Added a utility method to TestBase class to debug print an SBValue object. llvm-svn: 112247
* Added a utility function EnvArray() to lldbtest.py.Johnny Chen2010-08-261-0/+6
| | | | llvm-svn: 112223
* o Added a test case for array_types which uses the Python APIs from lldb.py,Johnny Chen2010-08-261-0/+29
| | | | | | | | | | | | | with the only exception of launching the process from SBTarget which is under investigation. o build-swig-Python.sh should also checks the timestamp of ${swig_input_file} for update eligibility. Also, once an update is in order, there's no need to check the remaining header files for timestamps. o Coaches swig to treat StopReason as an int type, instead of a C++ class. llvm-svn: 112210
* Minor doc string modification.Johnny Chen2010-08-251-1/+1
| | | | llvm-svn: 112103
* Added logic to TestUniversal.py to exercise the python APIs:Johnny Chen2010-08-251-0/+13
| | | | | | | | | | | | | | o SBDebugger.GetCurrentTarget() o SBTarget.GetProcess() o SBProcess.GetAddressByteSize() in order to make sure that, indeed, 64-bit, followed by 32-bit processes have been launched. Added invoke() method to TestBase to factor in the tracing logic in one place. This method allows an object to call a method with no arg reflectively. llvm-svn: 112102
* Fixed a logic error in the expect() method. If the start string does not match,Johnny Chen2010-08-251-2/+2
| | | | | | | | there's no point matching further sub strings; the expect() already fails. Also cleaned up the assert message for VARIABLES_DISPLAYED_CORRECTLY. llvm-svn: 112074
* Allow command retries in case of process launch failures. This recoveryJohnny Chen2010-08-251-8/+29
| | | | | | | | | mechanism seems to work fine on my MacBook Pro in some limited test cases. The default maxLaunchCount and timeWait variables used in the scheme can be overridden by the env variables LLDB_MAX_LAUNCH_COUNT and LLDB_TIME_WAIT. llvm-svn: 112071
* More descriptive trace messages for the matchings of start and sub strings.Johnny Chen2010-08-241-4/+9
| | | | llvm-svn: 112000
* Added a test for launching a universal binary. Launch of i386 architectureJohnny Chen2010-08-241-0/+2
| | | | | | | | currently fails: rdar://problem/8349784. Forgot to check in lldbtest.py in the previous commit r111958. llvm-svn: 111975
* Changed the keyword argument for runCmd()/expect() from 'verbose' to 'trace',Johnny Chen2010-08-231-7/+96
| | | | | | | | | | | 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
* Print the verbose output of runCmd()/expect() to stderr instead of stdout.Johnny Chen2010-08-201-8/+9
| | | | | | And converted the rest of the test cases to runCmd()/expect(). llvm-svn: 111677
* Changed TestBase.expect() to allow default 'msg' arg. Converted TestHelp.py.Johnny Chen2010-08-201-5/+5
| | | | llvm-svn: 111671
* Added more verbose output when string match fails. Converted ↵Johnny Chen2010-08-201-0/+6
| | | | | | TestGlobalVariables.py. llvm-svn: 111666
* Added verbose option to runCmd()/expect() in lldbtest.py. Converted ↵Johnny Chen2010-08-201-5/+15
| | | | | | TestFunctionTypes.py. llvm-svn: 111658
* Converted some more test cases to use runCmd()/expect().Johnny Chen2010-08-201-0/+2
| | | | llvm-svn: 111652
* Use cmd.startswith("run") instead of string equivalence test.Johnny Chen2010-08-191-1/+1
| | | | llvm-svn: 111587
* Abstracted the running of command through the command interpreter and checkingJohnny Chen2010-08-191-1/+40
| | | | | | | | | | | its return status into lldbtest.TestBase.runCmd(); and runCmd() in combination with checking the output against matching substrings (including startswith) into lldbtest.TestBase.expect(). TestUnsignedTypes.py is refactored to use the abstracted APIs. Other test cases to be modified later. llvm-svn: 111572
* Specify a more meaningful assert message for TestDeadStrip.py.Johnny Chen2010-08-171-0/+2
| | | | llvm-svn: 111294
* Factored the "continue" command execution of the inferior process as part of theJohnny Chen2010-08-161-0/+7
| | | | | | | | | 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
* Modified the remaining test cases to display more meaningful assert messages.Johnny Chen2010-08-091-3/+12
| | | | | | Added a generic message generator to the lldbtest.py base module. llvm-svn: 110625
* Added some commonly used assert messages to the lldbtest.py module which housesJohnny Chen2010-08-091-0/+18
| | | | | | | the TestBase. Modified TestArrayTypes.py to use the assert messages. Other files to follow. llvm-svn: 110611
* Commented out "import traceback".Johnny Chen2010-08-071-1/+1
| | | | llvm-svn: 110497
* o Added unittest2 which has added the new features in unittest for Python 2.7Johnny Chen2010-08-051-2/+2
| | | | | | | | | | | | | | 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
* When running a single test case, lldb.SBDebugger.Terminate() is not being calledJohnny Chen2010-08-051-0/+3
| | | | | | | because unittest.main() calls sys.exit() before returning. Fixed by registering an exit handler for this situation. llvm-svn: 110379
* Make it fail fast if 'mydir' attribute is not overridden by subclasses ofJohnny Chen2010-07-031-3/+5
| | | | | | | | lldbtest.TestBase. Also removed some debug prints. llvm-svn: 107575
* Abstracted the lldb-specific unittest.TestCase.setUp()/tearDown() in a separateJohnny Chen2010-07-031-0/+75
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
OpenPOWER on IntegriCloud