summaryrefslogtreecommitdiffstats
path: root/lldb/lit/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Re-land "[test] Split LLDB tests into API, Shell & Unit"Jonas Devlieghere2019-10-0920-141/+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-0920-0/+141
| | | | | | | | 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-0920-141/+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
* [Driver] Expand the executable path in the target create outputJonas Devlieghere2019-08-071-0/+7
| | | | | | | | | | | | | | | | | | Resolve the path in the target create output. This is nice when passing relative paths to the lldb command line driver. $ lldb ./binary (lldb) target create "./binary" Current executable set to '/absolute/path/to/binary' (x86_64). This change only affects the target create output and does not change the debugger's behavior. It doesn't resolve symbolic links so it won't cause confusing when debugging something like clang++ that's symlinked to clang. Differential revision: https://reviews.llvm.org/D65611 llvm-svn: 368182
* Reapply "Fix a crash in option parsing."Adrian Prantl2019-06-252-0/+4
| | | | | | | | with an additional read-out-of-bounds bugfix applied. Differential Revision: https://reviews.llvm.org/D63110 llvm-svn: 364260
* Revert "Fix a crash in option parsing."Davide Italiano2019-06-202-3/+0
| | | | | | This fails on the bots around 1/10 of the time. llvm-svn: 363999
* Fix a crash in option parsing.Adrian Prantl2019-06-112-0/+3
| | | | | | | | | | | The call to getopt_long didn't handle the case where the *last* option had an argument missing. <rdar://problem/51231882> Differential Revision: https://reviews.llvm.org/D63110 llvm-svn: 363101
* [lldb] [lit] Skip more tests when Python is unavailableMichal Gorny2019-05-191-0/+1
| | | | | | | | 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
* [lldb] [lit] Driver/TestConvenienceVariables.test requires PythonMichal Gorny2019-05-191-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D62096 llvm-svn: 361114
* Propagate command interpreter errors from lldlbinitJonas Devlieghere2019-05-083-0/+4
| | | | | | | | | | | | | | This patch ensures that we propagate errors coming from the lldbinit file trough the command/script interpreter. Before, if you did something like command script import syntax_error.py, and the python file contained a syntax error, lldb wouldn't tell you about it. This changes with the current patch: errors are now propagated by default. PS: Jim authored this change and I added testing. Differential revision: https://reviews.llvm.org/D61579 llvm-svn: 360216
* [Driver] Add command line option to allow loading local lldbinit file.Jonas Devlieghere2019-05-071-2/+5
| | | | | | | | | This patch adds a command line flag that allows lldb to load local lldbinit files. Differential revision: https://reviews.llvm.org/D61578 llvm-svn: 360172
* [Driver] Change the way we deal with local lldbinit files.Jonas Devlieghere2019-05-062-0/+10
| | | | | | | | | | | | | | | | Currently we have special handling for local lldbinit files in the driver. At the same time, we have an SB API named `SourceInitFileInCurrentWorkingDirectory` that does the same thing. This patch removes the special handling from the driver and uses the API instead. In addition to the obvious advantages of having one canonical way of doing things and removing code duplication, this change also means that the code path is the same for global and local lldb init files. Differential revision: https://reviews.llvm.org/D61577 llvm-svn: 360077
* Update the lldb driver to support the -O and -S options when passing --replAdrian Prantl2019-03-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment when --repl is passed to lldb it silently ignores any commands passed via the options below: --one-line-before-file <command> Tells the debugger to execute this one-line lldb command before any file provided on the command line has been loaded. --one-line <command> Tells the debugger to execute this one-line lldb command after any file provided on the command line has been loaded. --source-before-file <file> Tells the debugger to read in and execute the lldb commands in the given file, before any file has been loaded. --source <file> Tells the debugger to read in and execute the lldb commands in the given file, after any file has been loaded. -O <value> Alias for --one-line-before-file -o <value> Alias for --one-line -S <value> Alias for --source-before-file -s <value> Alias for --source The -O and -S options are quite useful when writing tests for the REPL though, e.g. to change settings prior to entering REPL mode. This patch updates the driver to still respect the commands supplied via -O and -S when passing --repl instead of silently ignoring them. As -s and -o don't really make sense in REPL mode, commands supplied via those options are still ignored, but the driver now emits a warning to make that clear to the user. Patch by Nathan Hawes! Differential Revision: https://reviews.llvm.org/D59681 llvm-svn: 356911
* [testsuite] Add a comment explaining what this test does.Davide Italiano2019-02-121-0/+1
| | | | llvm-svn: 353896
* [testsuite] Convert TestSingleQuote to lit.Davide Italiano2019-02-122-0/+8
| | | | | | Nothing crazy, this is pretty mechanical. llvm-svn: 353894
* [lit] Make TestConvenienceVariables a cpp fileJonas Devlieghere2018-12-194-9/+14
| | | | | | | | | | | The build.py script always runs the compiler in C++ mode, regardless of the file extension. This results in mangled names presented to the linker which in turn cannot find the printf symbol. While we figure out how to solve this issue I've turned the source file into a cpp file and added extern c. This should unbreak the bots. llvm-svn: 349642
* [lit] Rather than including stdio.h, forward-declare printf in ↵Stella Stamenova2018-12-181-1/+1
| | | | | | TestConvenienceVariables.test llvm-svn: 349573
* [lit] Use the new build.py script in the lldb-mi testsStella Stamenova2018-12-182-4/+5
| | | | | | This allows the tests to pass on Windows as well llvm-svn: 349562
* Rewrite pexpect-based test in LIT/FileCheck.Adrian Prantl2018-12-103-0/+36
| | | | | | | pexecpt-based tests are flakey because they involve timeouts and this test is eprfectly serializable. llvm-svn: 348808
* [driver] Fix --core/-c and add testJonas Devlieghere2018-11-292-0/+4
| | | | | | | | | | | Because the optarg variable was shadowed we didn't notice we weren't extracting the value from the option. This patch fixes that and renames the variable to prevent this from happening in the future. I also added two tests to check the error output for --core and --file when the given value doesn't exist. llvm-svn: 347821
* [Driver] Use libOption with tablegen.Jonas Devlieghere2018-11-276-0/+49
This patch modifies the lldb driver to use libOption for option parsing. It allows us to decouple option parsing from option processing which is important when arguments affect initialization. This was previously not possible because the debugger need to be initialized as some option interpretation (like the scripting language etc) was handled by the debugger, rather than in the driver. Differential revision: https://reviews.llvm.org/D54692 llvm-svn: 347709
OpenPOWER on IntegriCloud