summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/command_regex
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-282-57/+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
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-0/+2
| | | | | | | | | | | | | 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-7/+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
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Remove expectedFailureFreeBSD for passing pexpect testsEd Maste2015-08-311-1/+0
| | | | | | | | | | These tests work when run locally. They had been occasionally failing on the FreeBSD buildbot due to pexpect issues. That buildbot is currently down, and I expect the replacement will not have this issue. llvm.org/pr22784 llvm-svn: 246490
* XFail pexpect tests for Windows hosts.Chaoren Lin2015-06-091-1/+1
| | | | | | | | | | Reviewers: vharron, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10340 llvm-svn: 239414
* Refactored lldb executable name discoveryVince Harron2015-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | The lldb executable was referenced through the code by 7 different (effectively) global variables. global lldbExecutablePath global lldbExecutable os.environ['LLDB_EXEC'] os.environ['LLDB_TEST'] dotest.lldbExec dotest.lldbHere lldbtest.lldbExec This change uses one global variable lldbtest_config.lldbExec to replace them all. Differential Revision: http://reviews.llvm.org/D9817 llvm-svn: 237600
* Add expectedFailureFreeBSD decorator for buildbot pexpect issueEd Maste2015-05-081-0/+1
| | | | | | | | | | I'm not yet sure what's wrong with pexpect and I cannot reproduce this problem locally. XFAIL these tests for now to reduce buildbot noise so I can track down the remaining buildbot failures. llvm.org/pr22784 llvm-svn: 236857
* XFAIL pexpect tests on Windows.Zachary Turner2015-01-201-0/+1
| | | | | | | | | | | | | At some point we will need to either provide a pexpect equivalent on Windows, or provide some other method of doing out-of-process tests. Even with a pexpect replacement, it may be worth re-evaluating some of these tests to see if they would be better served as in-process tests. The larger issue of coming up with a pexpect replacement on Windows is tracked in http://llvm.org/pr22274. llvm-svn: 226614
* Fixed the regex test case after recent modifications to the "help" command ↵Greg Clayton2015-01-151-2/+1
| | | | | | | | output. <rdar://problem/18527567> llvm-svn: 226218
* Fixed an issue where you couldn't delete a user defined regex, python, or ↵Greg Clayton2015-01-091-0/+13
| | | | | | | | | | | multi-word command by adding a new "command delete" command. This new command will delete user defined regular commands, but not aliases. We still have "command unalias" to remove aliases as they are currently in different buckets. Appropriate error messages are displayed to inform the user when "command unalias" is used on removable user defined commands that points users to the "command delete" command. Added a test to verify we can remove user defined commands and also verify that "command unalias" fails when used on a user defined command. <rdar://problem/18248300> llvm-svn: 225535
* Fixed a broken test suite test after recent editline merges.Greg Clayton2014-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that editline currently is trying to be smart when we paste things into a terminal window. It detects that input is pending and multi-line input is accepted as long as there is anything pending. So if you open lldb and paste the text between the quotes: "command regex carp s/^$/help/ carp " We still still be stuck in the "command regex" multi-line input reader as it will have all three lines: "s/^$/help/ carp " The true fix for this is something Kate Stone will soon work on: - multi-line input readers must opt into this paste/pending input feature ("expr" will opt into it, all other commands won't) - If we are in a multi-line input reader that requests this and stuff is pasted, then it will do what it does today - if we start in a IOHandler that doesn't need/want pending input and text is pasted, and we transistion to a IOHandler that does want this functionality, then disable the pending input. Example text would be: "frame variable thread backtrace expr for (int i=0;i<10;++i) (int)printf("i = %i\n", i); frame select 0 " When we push the expression multi-line reader we would disable the pending input because we had pending input _before_ we entered "expr". If we did this first: (lldb) expr Then we pasted: "void foo() { } void bar() { } " Then we would allow the pending input to not look for an empty line to terminate the expression. We filed radar 19008425 to track fixing this issue. llvm-svn: 222206
* Fixes a number of issue related to test portability on Windows.Zachary Turner2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 99% of this CL is simply moving calls to "import pexpect" to a more narrow scope - i.e. the function that actually runs a particular test. This way the test suite can run on Windows, which doesn't have pexpect, and the individual tests that use pexpect can be disabled on a platform-specific basis. Additionally, this CL fixes a few other cases of non-portability. Notably, using "ps" to get the command line, and os.uname() to determine the architecture don't work on Windows. Finally, this also adds a stubbed out builder_win32 module. The full test suite runs correctly on Windows after this CL, although there is still some work remaining on the C++ side to fix one-shot script commands from LLDB (e.g. script print "foo"), which currently deadlock. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4573 llvm-svn: 213343
* Merging the iohandler branch back into main. Greg Clayton2014-01-271-2/+2
| | | | | | | | | | | | The many many benefits include: 1 - Input/Output/Error streams are now handled as real streams not a push style input 2 - auto completion in python embedded interpreter 3 - multi-line input for "script" and "expression" commands now allow you to edit previous/next lines using up and down arrow keys and this makes multi-line input actually a viable thing to use 4 - it is now possible to use curses to drive LLDB (please try the "gui" command) We will need to deal with and fix any buildbot failures and tests and arise now that input/output and error are correctly hooked up in all cases. llvm-svn: 200263
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-1/+1
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* Adding a "cmdline" category to the test suiteEnrico Granata2013-06-181-0/+1
| | | | llvm-svn: 184155
* Revert 143359 and modify the test case to not include non-valid c identifier ↵Johnny Chen2011-10-311-2/+2
| | | | | | character. llvm-svn: 143372
* If we spawn an lldb process for test (via pexpect), do not load the init ↵Johnny Chen2011-10-071-1/+1
| | | | | | | | | file unless told otherwise. Set up self.lldbOption to be "--no-lldbibit" unless env variable NO_LLDBIBIT is defined and equals "NO". Also add "-nx" to gdb spawned. llvm-svn: 141384
* Add a new attribute self.lldbHere, representing the fullpath to the 'lldb' ↵Johnny Chen2011-08-261-1/+1
| | | | | | | | | | | | | | | | executable built locally from the source tree. This is distinguished from self.lldbExec, which can be used by test/benchmarks to measure the performances against other debuggers. You can use environment variable LLDB_EXEC to specify self.lldbExec to the dotest.py test driver, otherwise it is going to be populated with self.lldbHere. Modify the regular tests under test dir, i.e., not test/benchmarks, to use self.lldbHere. Also modify the benchmarks tests to use self.lldbHere when it needs an 'lldb' executable with debug info to do the performance measurements. llvm-svn: 138608
* Move more top level test dirs to reside under functionalities dir.Johnny Chen2011-06-261-0/+44
llvm-svn: 133894
OpenPOWER on IntegriCloud