summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/completion
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-284-343/+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-4/+6
| | | | | | | | | | | | | 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-8/+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
* Adjust TestCompletion.py and TestDumpDynamic.py after recent changes.Siva Chandra2015-10-201-1/+1
| | | | | | | | | | Reviewers: zturner, spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13882 llvm-svn: 250782
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix TestCompletion.py failure on Darwin after r246639Ying Chen2015-09-031-0/+2
| | | | | | | | | | | | Summary: - send empty line for multiple commands to complete Reviewers: tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12584 llvm-svn: 246791
* Change Windows XFAIL comment for TestCompletion.pyZachary Turner2015-09-021-33/+32
| | | | | | | | | | Instead of fixing these tests by finding a pexpect replacement, this set of tests can be fixed by re-writing the test to not use pexpect. llvm.org/pr24679 llvm-svn: 246671
* XFAIL new tests in TestCompletion on windows due to missing pexpectPavel Labath2015-09-021-0/+2
| | | | llvm-svn: 246644
* Fix tab completion for command arguments containing spacesTamas Berghammer2015-09-023-0/+36
| | | | | | | | | | | If a command argument contains a space then it have to be escaped with backslash signs so the argument parsing logic can parse it properly. This CL fixes the tab completion code for the arguments to create complitions with correctly escaped strings. Differential revision: http://reviews.llvm.org/D12531 llvm-svn: 246639
* XFail pexpect tests for Windows hosts.Chaoren Lin2015-06-091-31/+31
| | | | | | | | | | 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
* Skip tests that are timing out on the FreeBSD buildbotEd Maste2015-05-091-0/+1
| | | | | | | | | XFAILing these does not work because the timeout is caught by the top-level test infrastucture instead. Some might be llvm.org/pr22784 llvm-svn: 236924
* Skip tests that are timing out on the FreeBSD buildbotEd Maste2015-05-081-0/+30
| | | | | | | | | XFAILing these does not work because the timeout is caught by the top-level test infrastucture instead. Might be llvm.org/pr22784 llvm-svn: 236895
* Fix CommandLineCompletionTestCase.test_watchpoint_xxx tests after r230408Ilia K2015-02-251-3/+13
| | | | llvm-svn: 230463
* XFAIL pexpect tests on Windows.Zachary Turner2015-01-201-0/+29
| | | | | | | | | | | | | 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
* [TestCompletion] Spawn LLDB with '--no-use-colors'.Siva Chandra2014-12-191-1/+2
| | | | | | | | | | | | | | | | | | | Summary: TestCompletion was broken for Ubuntu (and probably for Debian also). The issue was that the lldb prompt in color (which is the default behavior) was confusing pexpect. Test Plan: "http://199.223.233.39:8011/lldb-try-clang-build-clang-test/" Reviewers: zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6671 llvm-svn: 224642
* 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
* 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
* Enable tests affected by llvm.org/pr14637Daniel Malea2013-09-251-1/+0
| | | | | | - to verify that r191392 has the desired effect llvm-svn: 191396
* Adding a "cmdline" category to the test suiteEnrico Granata2013-06-181-0/+1
| | | | llvm-svn: 184155
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-151-1/+1
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Revert r181833: lldb prompt issue still occurs on buildbot ↵Daniel Malea2013-05-151-0/+1
| | | | | | | | (http://lab.llvm.org:8011/builders/lldb-x86_64-linux/builds/4124) - maybe consider checking in the 'good' version of libedit to avoid ancient system version llvm-svn: 181903
* Remove XFAIL from tests affected by llvm.org/pr-14637Daniel Malea2013-05-141-1/+0
| | | | | | - unable to repro locally, much like many people commenting on the issue llvm-svn: 181833
* Fix linux argument completion with for "--" options (llvm.org/bugs/pr14425)Daniel Malea2013-04-231-1/+0
| | | | | | | | | | | | | | | | | | | Patch by Yacine Belkadi! When __GLIBC__ is defined, optind gets initialized to 0. So for the first parsed option, parse_start is 0, too. If this option has no argument (Like "--continue" of "process attach"), then the position stored is 0, instead of 1. This prevents the completion later on in Options::HandleOptionCompletion() because the opt_pos doesn't match the cursor_index. Fix that by getting the option's position from the value of optind, as it's done for the other types of options. Re-enable test_process_attach_dash_dash_con() on Linux. No regressions detected on Mac OS X (in TestCompletion.py) llvm-svn: 180114
* Skip TestCompletion case that fails on linux (with gcc) because the input ↵Daniel Malea2013-02-201-1/+2
| | | | | | prompt is not displayed (llvm.org/pr14637) llvm-svn: 175665
* Update test status on LinuxDaniel Malea2012-11-231-0/+1
| | | | | | | | | - add decorators @expectedFailLinux and @skipOnLinux - skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426 Patch by Ashok Thirumurthi! llvm-svn: 168529
* Initial commit of a new testsuite feature: test categories.Enrico Granata2012-09-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | This feature allows us to group test cases into logical groups (categories), and to only run a subset of test cases based on these categories. Each test-case can have a new method getCategories(self): which returns a list of strings that are the categories to which the test case belongs. If a test-case does not provide its own categories, we will look for categories in the class that contains the test case. If that fails too, the default implementation looks for a .category file, which contains a comma separated list of strings. The test suite will recurse look for .categories up until the top level directory (which we guarantee will have an empty .category file). The driver dotest.py has a new --category <foo> option, which can be repeated, and specifies which categories of tests you want to run. (example: ./dotest.py --category objc --category expression) All tests that do not belong to any specified category will be skipped. Other filtering options still exist and should not interfere with category filtering. A few tests have been categorized. Feel free to categorize others, and to suggest new categories that we could want to use. All categories need to be validly defined in dotest.py, or the test suite will refuse to run when you use them as arguments to --category. In the end, failures will be reported on a per-category basis, as well as in the usual format. This is the very first stage of this feature. Feel free to chime in with ideas for improvements! llvm-svn: 164403
* rdar://problem/11811338Johnny Chen2012-08-241-0/+8
| | | | | | | Add 'attach <pid>|<process-name>' command to lldb, as well as 'detach' which is an alias of 'process detach'. Add two completion test cases for "attach" and "detach". llvm-svn: 162573
* Reimplemented the code that backed the "settings" in lldb. There were many ↵Greg Clayton2012-08-221-6/+6
| | | | | | | | | | | | | issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing". llvm-svn: 162366
* rdar://problem/12096295Johnny Chen2012-08-151-0/+4
| | | | | | | Add an lldb command line option to specify a core file: --core/-c. For consistency, change the "target create" command to also use --core. llvm-svn: 161993
* Add command completion test case for 'watchpoint command'.Johnny Chen2012-08-101-0/+4
| | | | llvm-svn: 161684
* Test suite cleanup: use Python API to remove files as part of cleanup ↵Johnny Chen2012-06-191-2/+2
| | | | | | instead of running OS commands. llvm-svn: 158737
* Fixed TestCompletion, broken by r158173Filipe Cabecinhas2012-06-081-2/+2
| | | | llvm-svn: 158207
* rdar://problem/11457634Johnny Chen2012-05-241-0/+4
| | | | | | | Supports the use-case scenario of immediately continuing the process once attached. Add a simple completion test case from "process attach --con" to "process attach --continue ". llvm-svn: 157361
* Synthetic values are now automatically enabled and active by default. ↵Enrico Granata2012-03-271-4/+4
| | | | | | | | | | | | SBValue is set up to always wrap a synthetic value when one is available. A new setting enable-synthetic-value is provided on the target to disable this behavior. There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic. The test suite has been changed accordingly. Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching llvm-svn: 153495
* Add a test case to go with <rdar://problem/11052829> and svn check-in r152809.Johnny Chen2012-03-151-5/+16
| | | | llvm-svn: 152825
* Remove the functionality of using 'frame variable -w' to set a watchpoint ↵Johnny Chen2012-02-141-6/+6
| | | | | | | | now that 'watchpoint set variable/expression' is working. Also update the relevant test cases. llvm-svn: 150514
* Add a test case for completion from 'settings set target.exec' to 'settings ↵Johnny Chen2012-02-131-0/+4
| | | | | | set target.exec-search-paths '. llvm-svn: 150427
* After discussions with Jim and Greg, modify the 'watchpoint set' command to ↵Johnny Chen2012-02-081-6/+10
| | | | | | | | | | | | | | | | become a mutiword command with subcommand 'expression' and 'variable'. The first subcommand is for supplying an expression to be evaluated into an address to watch for, while the second is for watching a variable. 'watchpoint set expression' is a raw command, which means that you need to use the "--" option terminator to end the '-w' or '-x' option processing and to start typing your expression. Also update several test cases to comply and add a couple of test cases into TestCompletion.py, in particular, test that 'watchpoint set ex' completes to 'watchpoint set expression ' and that 'watchpoint set var' completes to 'watchpoint set variable '. llvm-svn: 150109
* Add a couple of simple completion test cases for 'target ' and 'target va'.Johnny Chen2012-02-031-0/+11
| | | | llvm-svn: 149656
* Add some more test cases for the "watchpoint set" command.Johnny Chen2012-01-311-0/+12
| | | | llvm-svn: 149324
* Move argument checking/manipulation into the front of the function.Johnny Chen2012-01-251-4/+9
| | | | llvm-svn: 148974
* Clearify some comment.Johnny Chen2012-01-251-1/+2
| | | | llvm-svn: 148972
* Cleanup docstring and remove dead code.Johnny Chen2012-01-251-4/+3
| | | | llvm-svn: 148971
* Add some more test cases for command completion:Johnny Chen2012-01-251-0/+12
| | | | | | | | o complete an unambiguous option o complete/list the available option values o complete/list the candidate command names llvm-svn: 148899
* Followup check in for http://llvm.org/viewvc/llvm-project?rev=148491&view=rev,Johnny Chen2012-01-231-0/+12
| | | | | | | | | where we changed the CommandObjectSettingsSet object impl to require raw command string. Do the same for CommandObjectSettingsAppend/InsertBefore/InsertAfter classes and add test cases for basic functionalities as well as for variable name completion. llvm-svn: 148719
* Followup check in for http://llvm.org/viewvc/llvm-project?rev=148491&view=rev,Johnny Chen2012-01-211-0/+4
| | | | | | | | | | where we changed the CommandObjectSettingsSet object impl to require raw command string. Do the same for CommandObjectSettingsReplace class and add two test cases; one for the "settings replace" command and the other to ensure that completion for variable name still works. llvm-svn: 148615
* Add comment.Johnny Chen2012-01-211-3/+4
| | | | llvm-svn: 148602
* A little bit of cleanup to make the code more understandable.Johnny Chen2012-01-201-6/+6
| | | | llvm-svn: 148600
OpenPOWER on IntegriCloud