summaryrefslogtreecommitdiffstats
path: root/lldb/test/tools/lldb-mi/lldbmi_testcase.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-54/+0
| | | | | | | | | | | This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251444
* Deprecate -m/+m dotest options in favor of test categoriesPavel Labath2015-10-271-0/+3
| | | | | | | | | | | | | | | | | | | Summary: This change deprecates -m/+m dotest options (the options are still recognized but they print an error message pointing to the new options) and adds a new lldb-mi test category instead. To just run lldb-mi tests, use '-G lldb-mi'. To skip lldb-mi tests, use '--skip-category lldb-mi'. All lldb-mi tests are marked as such using the getCategories method on the base MiTestCaseBase class and the @lldbmi_test decorator is not needed. In case one still needs to annotate a specific test function as an lldb-mi test, one can use the @add_test_categories(['lldb-mi']) decorator to achieve that. Reviewers: tfiala, dawn, ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14060 llvm-svn: 251400
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-2/+4
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-221-1/+2
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* Have lldb-mi tests import pexpect at a narrower scope.Zachary Turner2015-05-261-1/+1
| | | | | | | | The tests are xfail'ed on Windows, but would still error out since they were importing pexpect at global scope. This way the tests will correctly report as unsupported. llvm-svn: 238249
* Make LLDB-MI tests wait for LLDB-MI to start up before sending any MI commandsBruce Mitchener2015-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This set of changes addresses the issue I described in [[ http://llvm.org/pr23403 | Bug 23403 ]], in short most LLDB-MI tests fail unexpectedly due to timeout on my Ubuntu 14.10 x86_64 VirtualBox VM. I have no idea why the Ubuntu buildbots don't seem to suffer from this issue. This patch just makes **MiTestCaseBase.spawnLldbMi()** block until the spawned LLDB-MI child process outputs the **(gdb)** prompt, which ensures that MI commands aren't sent to the LLDB-MI child process until it's ready. Before these changes 52 LLDB-MI tests failed unexpectedly (all but one due to timeouts), after these changes no tests fail due to timeouts. I still get one unexpected failure in **test_lldbmi_source_option_start_script_error** in **TestMiStartupOptions.py**, but that's due to a file error, that test should be skipped on Linux just like the other two //start_script// tests until the file error is fixed. Patch from Vadim Macagon. Thanks! Test Plan: ./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh, domipheus, ki.stfu Reviewed By: ki.stfu Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D9595 llvm-svn: 236816
* Ignore IOError from missing child.log.Chaoren Lin2015-04-061-1/+4
| | | | | | | | | | | | | | | | | | | Summary: TestMiCliSupport (among other TestMi*) fails on Linux with ``` IOError: [Errno 2] No such file or directory: 'child.log' ``` Reviewers: clayborg, ki.stfu Reviewed By: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8843 llvm-svn: 234191
* Forgot to remove initialization of MiTestCaseBase.mydir in r230022Ilia K2015-02-201-1/+1
| | | | llvm-svn: 230025
* Refactor lldb-mi testsIlia K2015-02-201-1/+1
| | | | | | | | | | | | | | | | | | | Summary: This patch includes following changes: * split lldb-mi tests into separate folders. It will make our life simpler because we can modify a test program of certain test and don't worry about other tests * a bit refactoring * fix comments * improve some tests Reviewers: emaste, clayborg, abidh Reviewed By: clayborg, abidh Subscribers: clayborg, lldb-commits, emaste, abidh Differential Revision: http://reviews.llvm.org/D7762 llvm-svn: 230022
* Add and update lldb-mi tests.Hafiz Abid Qadeer2015-02-051-2/+4
| | | | | | | | | | | | | | | | | | | This patch includes following changes: Fix comments and code style Add new tests for many commands Improve existing tests Merge MiProgramArgsTestCase and MiExecTestCase Improve runCmd of MiTestCaseBase: add exactly option Improve test example (make it more complicated) Patch from ki.stfu. I xfailed some tests on Linux and also added an empty command after -gdb-exit as it blocks without it. Patch was reviewed in http://reviews.llvm.org/D7410. llvm-svn: 228286
* Clean lldb-mi test cases.Hafiz Abid Qadeer2015-01-271-0/+41
This patch adds lldbmi_testcase.MiTestCaseBase class and removes a lot of repitition in the lldb-mi test cases. Also cleans import list and code-style. Presented for review in http://reviews.llvm.org/D7162. Patch from Ilia K <ki.stfu@gmail.com>. llvm-svn: 227218
OpenPOWER on IntegriCloud