summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Port TestBatchMode to PExpectTest classPavel Labath2019-09-042-91/+56
| | | | | | | | | | | | | | | Summary: I'm doing this mainly for consistency, but there are also other cleanups that will be enabled by this (e.g., the automatic setting of clang-modules-cache-path setting). Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67082 llvm-svn: 370858
* [lldb][NFC] Add a simple test for thread_local storage.Raphael Isemann2019-09-043-0/+25
| | | | | | | Seems we fail to read TLS data on Linux, so the test only runs on macOS for now. We will see how this test runs on the BSD bots. llvm-svn: 370848
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-04557-1581/+552
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of each test case knowing its depth relative to the test root, we can just have dotest add the folder containing Makefile.rules to the include path. This was motivated by r370616, though I have been wanting to do this ever since we moved to building tests out-of-tree. The only manually modified files in this patch are lldbinline.py and plugins/builder_base.py. The rest of the patch has been produced by this shell command: find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} + Reviewers: teemperor, aprantl, espindola, jfb Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D67083 llvm-svn: 370845
* [lldb] [test] Mark 'reenabled' tests XFAIL on NetBSDMichal Gorny2019-09-045-0/+5
| | | | llvm-svn: 370842
* [lldb] [test] Un-mark two commands/register tests XFAILMichal Gorny2019-09-041-2/+0
| | | | llvm-svn: 370840
* [lldb][NFC] Remove lldbcurses.pyRaphael Isemann2019-09-031-1306/+0
| | | | | | | | | | | | | | | | Summary: This doesn't seem to be used anymore (at least I can't find any reference to this in the LLDB repo and it doesn't seem to be a standalone script). Git says this was once some new curses mode for viewing test results. Reviewers: clayborg, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67064 llvm-svn: 370804
* [test] Addres TestConcurrentMany*.py flakiness on macOSJonas Devlieghere2019-09-031-16/+11
| | | | | | | | | | On "fast" macOS machines, the TestConcurrentMany*.py tests would fail randomly with different numbers of breakpoints, watchpoints, etc. This seems to be avoidable by giving the threads a little time to breath after the passing the synchronization barrier. This is far from a structural fix but it reduces the flakiness. llvm-svn: 370785
* [test] Remove print statements and verify that the symbol existsJonas Devlieghere2019-09-031-10/+1
| | | | | | | This removes some (commented out) print statements and adds a line that verifies that uses image list to check the symbol. llvm-svn: 370777
* [lldb][NFC] Disable added frame select and all log option test on windowsRaphael Isemann2019-09-032-0/+2
| | | | llvm-svn: 370776
* [lldb] Test 'frame select -r' and fix that INT32_MIN breaks the option parserRaphael Isemann2019-09-033-0/+56
| | | | llvm-svn: 370734
* [lldb][NFC] Test 'command delete'Raphael Isemann2019-09-031-0/+17
| | | | llvm-svn: 370733
* [lldb][NFC] Test that enabling all log options doesn't crash anythingRaphael Isemann2019-09-031-0/+11
| | | | llvm-svn: 370724
* [lldb][NFC] Remove unnecessary constructors from invalid-args testsRaphael Isemann2019-09-033-9/+0
| | | | llvm-svn: 370719
* [lldb][NFC] Simplify script_alias testRaphael Isemann2019-09-031-4/+1
| | | | llvm-svn: 370718
* [lldb][NFC] Also test unaliasing in nested_alias testRaphael Isemann2019-09-031-0/+9
| | | | llvm-svn: 370717
* [lldb] Test 'command' commands and fix the found crashesRaphael Isemann2019-09-031-0/+58
| | | | llvm-svn: 370712
* [lldb][NFC] Unify log files in commands/log/basicRaphael Isemann2019-09-031-9/+7
| | | | llvm-svn: 370706
* [lldb][NFC] Remove setup boilerplate from types/ testsRaphael Isemann2019-09-037-52/+1
| | | | | | This code doesn't seem to be necessary anymore. llvm-svn: 370702
* [dotest] Add @skipIfCursesSupportMissing and annotate the new gui testPavel Labath2019-09-023-8/+12
| | | | | | | | | | | | | | | Summary: The gui command requires curses support, which can be disabled at compile time. This patch adds the ability to detect this situation in the test suite and skip the test accordingly. Reviewers: teemperor, jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67073 llvm-svn: 370658
* [lldb][NFC] Add test for invalid gui commandRaphael Isemann2019-09-021-0/+15
| | | | llvm-svn: 370647
* [lldb][NFC] Remove unused imports from TestIntegerTypesExpr.pyRaphael Isemann2019-09-021-7/+0
| | | | llvm-svn: 370645
* [lldb][NFC] Remove unused imports from TestIntegerTypes.pyRaphael Isemann2019-09-021-6/+0
| | | | llvm-svn: 370641
* [lldb][NFC] Add test for source infoRaphael Isemann2019-09-024-0/+26
| | | | llvm-svn: 370638
* [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-292-10/+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
OpenPOWER on IntegriCloud