summaryrefslogtreecommitdiffstats
path: root/lldb/lit/Commands
Commit message (Collapse)AuthorAgeFilesLines
* Re-land "[test] Split LLDB tests into API, Shell & Unit"Jonas Devlieghere2019-10-0911-152/+0
| | | | | | | The original patch got reverted because it broke `check-lldb` on a clean build. This fixes that. llvm-svn: 374201
* Revert [test] Split LLDB tests into API, Shell & UnitAdrian Prantl2019-10-0911-0/+152
| | | | | | | | as it appears to have broken check-lldb. This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82) llvm-svn: 374187
* [test] Split LLDB tests into API, Shell & UnitJonas Devlieghere2019-10-0911-152/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184
* [LLDB] [test] Add a few missing cases of REQUIRES: pythonMartin Storsjo2019-09-241-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D67952 llvm-svn: 372739
* Fix command-script-import.test on linuxPavel Labath2019-09-182-3/+3
| | | | | | | | | | | | | | | | | | The test was expecting the value of "lldb.frame" to be None, because it is cleared after each python interpreter session. However, this is not true in the very first session, because lldb.py sets these values to invalid objects (lldb.SBFrame(), etc.). I have not investigated why is it that this test passes on darwin, but my guess is that this is because we do extra work on darwin (loading the objc runtime, etc), which causes us to enter the python interpreter sooner. This patch changes lldb.py to also initialize these values to None, as that seems to make more sense. I also fixed some typos in the test while I was in there. llvm-svn: 372222
* [lldb] Fix a test assertion after r372192Krasimir Georgiev2019-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The `CHECK: frame:py: None` seems to have been a typo, causing build bot failures: ``` # CHECK: frame:py: None ^ <stdin>:1:1: note: scanning from here (lldb) command source -s 0 'E:/build_slave/lldb-x64-windows-ninja/build/tools/lldb\lit\lit-lldb-init' ^ <stdin>:23:1: note: possible intended match here frame:py: No value ^ ``` This update fixes the build bots. -- Reviewers: bkramer Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D67702 llvm-svn: 372221
* [ScriptInterpreter] Limit LLDB's globals to interactive mode.Jonas Devlieghere2019-09-182-3/+7
| | | | | | | | | | | Jim pointed out that the LLDB global variables should only be available in interactive mode. When used from a command for example, their values might be stale or not at all what the user expects. Therefore we want to explicitly make these variables unavailable. Differential revision: https://reviews.llvm.org/D67685 llvm-svn: 372192
* lldb: move a test input to the test Inputs dirKrasimir Georgiev2019-09-172-1/+3
| | | | | | | | | | Summary: This makes the input file for a new test added in r372060 directly available in the Inputs subdirectory of the test dir. Differential Revision: https://reviews.llvm.org/D67655 llvm-svn: 372112
* [ScriptInterpreter] Initialize globals when loading a scripting module.Jonas Devlieghere2019-09-172-0/+10
| | | | | | | | | | | | | The LoadScriptingModule used by command script import wasn't initializing the LLDB global variables (things like `lldb.frame` and `lldb.debugger`). They would get initialized however when running the interactive script interpreter or running a single script line (e.g. `script print(lldb.frame)`). This patch fixes that by properly initializing the globals when loading a Python module. Differential revision: https://reviews.llvm.org/D67644 llvm-svn: 372060
* [lldb] [lit] Skip more tests when Python is unavailableMichal Gorny2019-05-191-0/+2
| | | | | | | | LocalLLDBInit.test requires Python module loading support. CommandScriptImmediateOutput tests are specific to running scripts. Disable all of them when Python support is disabled. llvm-svn: 361115
* [CommandInterpreter] Fix trailing blanks after `all` or [0-9]+ for btStella Stamenova2019-05-171-1/+1
| | | | | | The change that was committed for this used \\s to match spaces which does not work correctly on all platforms. Using [:space:] makes the test pass on both Linux and Windows llvm-svn: 361064
* [CommandInterpreter] Accept blanks after `all` or [0-9]+ for bt.Davide Italiano2019-05-171-0/+12
| | | | | | | | | | | Previously "bt all " would've failed as the regex didn't match them. Over the shoulder review by Jonas Devlieghere. <rdar://problem/50824935> llvm-svn: 360966
* [test] Make check more strictJonas Devlieghere2019-05-031-2/+2
| | | | | | | Before this change the test would always pass if the path to the test contained the number 11 in it. Thanks to Ted for pointing this out. llvm-svn: 359930
* [CommandObjectCommands] Honor stop-command-source-on-errorJonas Devlieghere2019-05-021-0/+12
| | | | | | | | | | | | This patch ensures that we honor the stop-command-source-on-error setting from `command source`. The problem is that we didn't differentiate between the boolean value being true or false, or not being set. For the latter scenario, we should calculate the value in the command interpreter based on the global options. Differential revision: https://reviews.llvm.org/D61406 llvm-svn: 359750
* [test] Fix & re-enable CommandScriptImmediateOutputFile on WindowsJonas Devlieghere2019-04-112-4/+5
| | | | | | | Apparently the shlex module produces garbage on Windows. I've added a hand rolled split instead that should suffice for this test. llvm-svn: 358216
* [test] Disable CommandScriptImmediateOutputFile on WindowsJonas Devlieghere2019-04-111-0/+2
| | | | | | | | | | | | | | | | | | | Somehow the path gets messed up. The command looks correct, but the python path is not. (lldb) mywrite E:\build_slave\lldb-x64-windows-ninja\build\tools\lldb\lit\Commands\ CommandScriptImmediateOutput\Output\ CommandScriptImmediateOutputFile.test.tmp.read.txt r No such file or directory: 'E:build_slavelldb-x64-windows-ninjabuildtoolslldblitCommands CommandScriptImmediateOutputOutput CommandScriptImmediateOutputFile.test.tmp.read.txt' Maybe the shlex module is escaping it? llvm-svn: 358213
* [test] Convert CommandScriptImmediateOutput from pexpect to litJonas Devlieghere2019-04-113-0/+81
| | | | | | | | | This converts the CommandScriptImmediateOutput test from a python test using pexpect to a lit test. Differential revision: https://reviews.llvm.org/D60566 llvm-svn: 358180
* Quiet command regex instructions during batch executionDave Lee2019-03-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Within .lldbinit, regex commands can be structured as a list of substitutions over multiple lines. It's possible that this is uninentional, but it works and has benefits. For example: command regex <command-name> s/pat1/repl1/ s/pat2/repl2/ ... I use this form of `command regex` in my `~/.lldbinit`, because it makes it clearer to write and read compared to a single line definition, because multiline substitutions don't need to be quoted, and are broken up one per line. However, multiline definitions result in usage instructions being printed for each use. The result is that every time I run `lldb`, I get a dozen or more lines of noise. With this change, the instructions are only printed when `command regex` is invoked interactively, or from a terminal, neither of which are true when lldb is sourcing `~/.lldbinit`. Reviewers: clayborg, jingham Reviewed By: clayborg Subscribers: jdoerfert, kastiglione, xiaobai, keith, lldb-commits Differential Revision: https://reviews.llvm.org/D48752 llvm-svn: 355793
* [testsuite] Convert a pexpect test to lit.Davide Italiano2019-02-062-0/+25
Summary: Reviewers: JDevlieghere, friss, zturner, labath, jingham, serge-sans-paille Subscribers: llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57840 llvm-svn: 353345
OpenPOWER on IntegriCloud