summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb] Add description to option completions.Raphael Isemann2019-09-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now our argument completions are rather cryptic for command options as they only list the letters: ``` (lldb) breakpoint set - Available completions: -G -C -c -d -i -o -q -t -x [...] ``` With the new completion API we can easily extend this with the flag description so that it looks like this now: ``` (lldb) breakpoint set - Available completions: -G -- The breakpoint will auto-continue after running its commands. -C -- A command to run when the breakpoint is hit, can be provided more than once, the commands will get run in order left to right. -c -- The breakpoint stops only if this condition expression evaluates to true. -d -- Disable the breakpoint. -i -- Set the number of times this breakpoint is skipped before stopping. -o -- The breakpoint is deleted the first time it stop causes a stop. -q -- The breakpoint stops only for threads in the queue whose name is given by this argument. -t -- The breakpoint stops only for the thread whose TID matches this argument. -x -- The breakpoint stops only for the thread whose index matches this argument. ``` The same happens with --long-options now. Reviewers: #lldb, labath Reviewed By: labath Subscribers: labath, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67063 llvm-svn: 370628
* [lldb][NFC] Add basic test for GUI commandRaphael Isemann2019-09-023-0/+65
| | | | | | | | | | | | | | | | | | | | Summary: This adds a basic test for the GUI command. Just tests that it starts up, that we can quit the gui and help window, and that the basic UI elements are rendered. Mostly testing the waters how testing this command will do on the bots or if that will cause some serious issues when we do fancy ncurses stuff. Reviewers: labath, clayborg Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67018 llvm-svn: 370625
* [lldb][NFC] Remove unnecessary lldb_enable_attach in TestMultilineCompletionRaphael Isemann2019-09-021-1/+0
| | | | | | We don't actually need to call this for this test. llvm-svn: 370623
* [lldb] Test and fix invalid log command invocationsRaphael Isemann2019-09-011-0/+25
| | | | llvm-svn: 370619
* [lldb][NFC] Add test for invalid expression command argsRaphael Isemann2019-09-011-0/+48
| | | | llvm-svn: 370618
* [lldb][NFC] Fix failing tests on macOS after restructuring test folderRaphael Isemann2019-09-0127-28/+28
| | | | llvm-svn: 370616
* [lldb][NFC] Fix failing tests after restructuring test folderRaphael Isemann2019-09-0186-89/+89
| | | | | | | | Just adjusts all the relative paths in the Makefiles (and the breakpoint test which seems to rely on the name of its folder). llvm-svn: 370611
* [lldb] Restructure test folders to match LLDB command hierarchyRaphael Isemann2019-09-01584-4865/+0
| | | | | | | | | | | | | | | | | | | Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
* [lldb][NFC] Remove unused prompt variable in TestMultilineCompletion.pyRaphael Isemann2019-08-311-2/+0
| | | | llvm-svn: 370570
* [test] Make sys.stdout compatible with both Python 2 & 3Jonas Devlieghere2019-08-301-1/+2
| | | | | | This time's the charm. llvm-svn: 370552
* [test] Fix 'argument must be str, not bytes' for Python 3.Jonas Devlieghere2019-08-301-2/+2
| | | | | | Use `sys.stdout.buffer` instead of `sys.stdout` in lldbpexpect.py. llvm-svn: 370545
* [test] Make sure PROMPT is a stringJonas Devlieghere2019-08-301-1/+1
| | | | | | | | Currently tests using expect_prompt are failing on the Python 3 bot with an error saying "argument must be str, not bytes". I don't have a Python 3 build handy, but I suspect this might fix that. llvm-svn: 370526
* [lldb][NFC] More tests for invalid register command invocationsRaphael Isemann2019-08-301-0/+15
| | | | llvm-svn: 370503
* [dotest] Finish removing -qPavel Labath2019-08-301-1/+1
| | | | | | | One usage of this option remained, and caused dotest to error out if one happened to pass the -v flag. llvm-svn: 370462
* dotest: improvements to the pexpect testsPavel Labath2019-08-306-192/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While working on r370054, i've found it frustrating that the test output was compeletely unhelpful in case of failures. Therefore I've decided to improve that. In this I reuse the PExpectTest class, which was one of our mechanisms for running pexpect tests, but which has gotten orhpaned in the mean time. I've replaced the existing send methods with a "expect" method, which I've tried to design so that it has a similar interface to the expect method in regular non-pexpect dotest tests (as it essentially does something very similar). I've kept the ability to dump the transcript of the pexpect communication to stdout in the "trace" mode, as that is a very handy way to figure out what the test is doing. I've also removed the "expect_string" method used in the existing tests -- I've found this to be unhelpful because it hides the message that would be normally displayed by the EOF exception. Although vebose, this message includes some important information, like what strings we were searching for, what were the last bits of lldb output, etc. I've also beefed up the class to automatically disable the debug info test duplication, and auto-skip tests when the host platform does not support pexpect. This patch ports TestMultilineCompletion and TestIOHandlerCompletion to the new class. It also deletes TestFormats as it is not testing anything (definitely not formats) -- it was committed with the test code commented out (r228207), and then the testing code was deleted in r356000. Reviewers: teemperor, JDevlieghere, davide Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D66954 llvm-svn: 370449
* [test] Fix various module cache bugs and inconsistenciesJonas Devlieghere2019-08-295-21/+56
| | | | | | | | | | | | | | | | | Currently, lit tests don't set neither the module cache for building inferiors nor the module cache used by lldb when running tests. Furthermore, we have several places where we rely on the path to the module cache being always the same, rather than passing the correct value around. This makes it hard to specify a different module cache path when debugging a a test. This patch reworks how we determine and pass around the module cache paths and fixes the omission on the lit side. It also adds a sanity check to the lit and dotest suites. Differential revision: https://reviews.llvm.org/D66966 llvm-svn: 370394
* [dotest] Remove deprecated loggin through env variables.Jonas Devlieghere2019-08-291-72/+0
| | | | | | | | | | It used to be possible to enable logging through environment variables read by dotest. This approach is deprecated, as stated in the dotest help output. Instead --channel should be used. Differential revision: https://reviews.llvm.org/D66920 llvm-svn: 370387
* [dotest] Remove the curses result formatter.Jonas Devlieghere2019-08-293-351/+0
| | | | | | | | | | This removes the curses result formatter which appears to be broken. Passing --curses to dotest.py screws up my terminal and doesn't run any tests. It even crashes Python on occasion. Differential revision: https://reviews.llvm.org/D66917 llvm-svn: 370386
* [lldb][NFC] Try fixing TestCompletion.py on WindowsRaphael Isemann2019-08-291-2/+1
| | | | llvm-svn: 370316
* [lldb][NFC] Also test operator new/new[]/delete/delete[]/comma/addr-ofRaphael Isemann2019-08-291-0/+18
| | | | llvm-svn: 370315
* [python] remove testsuite vestiges.Davide Italiano2019-08-292-193/+0
| | | | llvm-svn: 370287
* [dotest] Make dotest.py invocation repeatableJonas Devlieghere2019-08-282-29/+7
| | | | | | | | | | | This removes support for reading the LLDB_TEST_ARGUMENTS environment variable and instead requires all arguments to be specified as part of the invocation. This ensures that dotest.py invocations are easily repeatable. Differential revision: https://reviews.llvm.org/D66912 llvm-svn: 370278
* [dotest] Remove --event-add-entriesJonas Devlieghere2019-08-282-25/+0
| | | | | | | | This argument was used by dosep.py to pass information around from the workers. With dosep.py gone, I'm fairly sure we don't need this any longer. llvm-svn: 370266
* [dotest] Remove --rerun-max-file-thresholdJonas Devlieghere2019-08-283-11/+0
| | | | | | This variable corresponding to this argument is set but never read. llvm-svn: 370264
* [dotest] Centralize and simplify session dir logic (NFC)Jonas Devlieghere2019-08-281-24/+11
| | | | | | | | I was looking at the session directory logic for unrelated reasons and noticed that the logic spread out across dotest. This simplifies things a bit by moving the logic together. llvm-svn: 370259
* [test] Temporarily disable two tests on WindowsJonas Devlieghere2019-08-282-0/+2
| | | | | | | | | | Disable the two failing tests until Raphael has a chance to investigate: Failing Tests (2): lldb-Suite :: functionalities/completion/TestCompletion.py lldb-Suite :: functionalities/target_command/TestTargetCommand.py llvm-svn: 370237
* [dotest] Remove outdates TODOJonas Devlieghere2019-08-281-1/+0
| | | | | | The referenced function `find_test_files_in_dir_tree` no longer exists. llvm-svn: 370235
* [dotest] Don't try to guess the lldb binary & python dir.Jonas Devlieghere2019-08-281-94/+17
| | | | | | | | | | Now that all supported build systems create a valid dotest.py invocation, we no longer need to guess the location of the lldb binary and Python directory. Differential revision: https://reviews.llvm.org/D66896 llvm-svn: 370234
* [dotest] Don't try to guess the llvm binary dir.Jonas Devlieghere2019-08-281-35/+0
| | | | | | | | | | | | | | | Now that all supported build systems create a valid dotest.py invocation, we no longer need to guess the directory where any of the llvm tools live. Additionally, the current logic is incomplete: it doesn't try to find any other tools than FileCheck, such as dsymutil for example. If no FileCheck is provided, we should print a warning and skip the tests that need it, but that's not part of this patch. Differential revision: https://reviews.llvm.org/D66893 llvm-svn: 370232
* [dotest] Don't spend time replacing spaces in print output.Jonas Devlieghere2019-08-281-8/+0
| | | | | | | Replacing all spaces with dashes seems like a lot of needless work for a string that's just printed. llvm-svn: 370231
* [TestCppOperators] Enable TestCppOperators on Windows.Jonas Devlieghere2019-08-281-2/+1
| | | | | | | | | This test is passing on the Windows bot: Unexpected Passing Tests (1): lldb-Suite :: lang/cpp/operators/TestCppOperators.py llvm-svn: 370227
* [dotest] Remove -q (quiet) flag.Jonas Devlieghere2019-08-284-48/+28
| | | | | | | | | | | | | | This patch removes the -q (quiet) flag and changing the default behavior. Currently the flag serves two purposes that are somewhat contradictory, as illustrated by the difference between the argument name (quiet) and the configuration flag (parsable). On the one hand it reduces output, but on the other hand it prints more output, like the result of individual tests. My proposal is to guard the extra output behind the verbose flag and always print the individual test results. Differential revision: https://reviews.llvm.org/D66837 llvm-svn: 370226
* [lldb][NFC] Test named operators like new and function names that might ↵Raphael Isemann2019-08-281-0/+18
| | | | | | confuse LLDB llvm-svn: 370199
* [lldb][NFC] Actually run all expects in lang/cpp/operatorsRaphael Isemann2019-08-281-12/+6
| | | | | | | | | | | | Apparently inline tests stop running anything after an empty line behind an self.expect, which is a very good approach that could never cause people to write tests that never run. This patch removes all the empty lines so that all this test is actually run. Also fixes the broken expects that only passed because they weren't run before. llvm-svn: 370195
* [lldb][NFC] Extend operator test case with conversion operatorsRaphael Isemann2019-08-281-0/+9
| | | | llvm-svn: 370194
* [lldb][NFC] Test custom C++ operatorsRaphael Isemann2019-08-283-0/+150
| | | | llvm-svn: 370186
* [lldb] Fix and test completion for ambiguous long optionsRaphael Isemann2019-08-282-0/+17
| | | | | | | | | | The refactoring patch for the option completion broke the completion for ambiguous long options. As this feature was also untested (as testing ambiguous options with the current test methods is impossible), I just noticed now. This patch restores the old behavior and adds a test for this feature. llvm-svn: 370185
* [test] Disable TestConcurrentManySignals on Darwin.Jonas Devlieghere2019-08-281-0/+2
| | | | | | This test is flaky on GreenDragon. Disable it until we figure out why. llvm-svn: 370136
* [dotest] Remove check for LLDB_TESTSUITE_FORCE_FINISHJonas Devlieghere2019-08-271-6/+0
| | | | llvm-svn: 370120
* [dotest] Remove results portJonas Devlieghere2019-08-278-72/+9
| | | | | | | | | | The results port was used by dosep.py to deal with test results coming form different processes. With dosep.py gone, I don't think we need this any longer. Differential revision: https://reviews.llvm.org/D66811 llvm-svn: 370090
* [lldb][NFC] Add missing invalid_core_file to TestTargetCommand testRaphael Isemann2019-08-271-0/+1
| | | | llvm-svn: 370057
* Stabilize TestIOHandlerCompletionPavel Labath2019-08-271-1/+2
| | | | | | | | | | | | pexpect gives as raw data going to a terminal. This means that if the completed line does not fit the emulated line, the returned data will contain line breaks. On my machine these line breaks happened to be inside the "iohandler/completion" string that the test was searching for. Work around this by telling pexpect to emulate a very wide terminal. llvm-svn: 370054
* [lldb][NFC] Add some tests for the target subcommandsRaphael Isemann2019-08-271-1/+145
| | | | llvm-svn: 370050
* [lldb][NFC] Give added test method a unique nameRaphael Isemann2019-08-271-2/+2
| | | | | | | | Otherwise dotest doesn't run the test and just lets it always pass. Also update the comment to explain that we do directory and not file completion. llvm-svn: 370047
* [lldb] Allow partial completions to fix directory completion.Raphael Isemann2019-08-272-0/+21
| | | | | | | | | | | | On the command line we usually insert a space after a completion to indicate that the completion was successful. After the completion API refactoring, this also happens with directories which essentially breaks file path completion (as adding a space terminates the path and starts a new arg). This patch restores the old behavior by again allowing partial completions. Also extends the iohandler and SB API tests as the implementation for this is different in Editline and SB API. llvm-svn: 370043
* Fix TestStdCXXDisassembly.pyPavel Labath2019-08-271-1/+1
| | | | | | missing decorator import. llvm-svn: 370020
* [test] Disable two of the recently (re)enabled tests on Windows.Jonas Devlieghere2019-08-272-0/+2
| | | | | | This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
* [dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere2019-08-2711-48/+0
| | | | | | | | | | | | Today I discovered the skipLongRunningTest decorator and to my surprise all the tests were passing without the decorator. They don't seem to be that expensive either, they take a few seconds but we have tests that take much longer than that. As such I propose to remove the decorator and enable them by default. Differential revision: https://reviews.llvm.org/D66774 llvm-svn: 369995
* [build_exception] Decode build failure messagesVedant Kumar2019-08-261-1/+1
| | | | | | | This is so that the test harness pretty-prints build error messages in trace mode, instead of dumping a raw python bytes object. llvm-svn: 369987
* TestFunctionStarts.py: add synchronizationFrederic Riss2019-08-262-2/+21
| | | | | | | | | We have started to see the no_binary version of this test fail. The reason is that the binary was being removed before the spawn actually launched the inferior. Add a simple filesystem based synchronization to avoid this race. llvm-svn: 369930
OpenPOWER on IntegriCloud