aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite
AgeCommit message (Collapse)AuthorFilesLines
2019-08-28[dotest] Don't spend time replacing spaces in print output.Jonas Devlieghere1-8/+0
Replacing all spaces with dashes seems like a lot of needless work for a string that's just printed. llvm-svn: 370231
2019-08-28[TestCppOperators] Enable TestCppOperators on Windows.Jonas Devlieghere1-2/+1
This test is passing on the Windows bot: Unexpected Passing Tests (1): lldb-Suite :: lang/cpp/operators/TestCppOperators.py llvm-svn: 370227
2019-08-28[dotest] Remove -q (quiet) flag.Jonas Devlieghere4-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
2019-08-28[lldb][NFC] Test named operators like new and function names that might ↵Raphael Isemann1-0/+18
confuse LLDB llvm-svn: 370199
2019-08-28[lldb][NFC] Actually run all expects in lang/cpp/operatorsRaphael Isemann1-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
2019-08-28[lldb][NFC] Extend operator test case with conversion operatorsRaphael Isemann1-0/+9
llvm-svn: 370194
2019-08-28[lldb][NFC] Test custom C++ operatorsRaphael Isemann3-0/+150
llvm-svn: 370186
2019-08-28[lldb] Fix and test completion for ambiguous long optionsRaphael Isemann2-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
2019-08-28[test] Disable TestConcurrentManySignals on Darwin.Jonas Devlieghere1-0/+2
This test is flaky on GreenDragon. Disable it until we figure out why. llvm-svn: 370136
2019-08-27[dotest] Remove check for LLDB_TESTSUITE_FORCE_FINISHJonas Devlieghere1-6/+0
llvm-svn: 370120
2019-08-27[dotest] Remove results portJonas Devlieghere8-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
2019-08-27[lldb][NFC] Add missing invalid_core_file to TestTargetCommand testRaphael Isemann1-0/+1
llvm-svn: 370057
2019-08-27Stabilize TestIOHandlerCompletionPavel Labath1-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
2019-08-27[lldb][NFC] Add some tests for the target subcommandsRaphael Isemann1-1/+145
llvm-svn: 370050
2019-08-27[lldb][NFC] Give added test method a unique nameRaphael Isemann1-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
2019-08-27[lldb] Allow partial completions to fix directory completion.Raphael Isemann2-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
2019-08-27Fix TestStdCXXDisassembly.pyPavel Labath1-1/+1
missing decorator import. llvm-svn: 370020
2019-08-27[test] Disable two of the recently (re)enabled tests on Windows.Jonas Devlieghere2-0/+2
This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
2019-08-27[dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere11-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
2019-08-26[build_exception] Decode build failure messagesVedant Kumar1-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
2019-08-26TestFunctionStarts.py: add synchronizationFrederic Riss2-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
2019-08-26[dotest] Print invocation when encountering an error.Jonas Devlieghere1-2/+6
With this patch dotest.py will print the full invocation whenever it fails to parse its arguments. The dotest invocation is usually build up with different inputs, potentially coming from CMake, lldb-dotest, lit or passed directly. This can make debugging hard, especially on CI, where there might be another layer of indirection. This aims to make that a bit easier. llvm-svn: 369922
2019-08-23Skip tail call frame tests when dwarf_version < 4Vedant Kumar9-8/+17
rdar://problem/54656572 llvm-svn: 369821
2019-08-23[LLDB] Address post-commit code review feedback.Jonas Devlieghere1-2/+0
This patch addresses Adrian McCarthy's code review feedback in https://reviews.llvm.org/D66447 llvm-svn: 369731
2019-08-22TestAppleSimulatorOSType: Pass the --standalone argument to simctlFrederic Riss1-1/+1
It looks like running without this argument was supported for legacy reasons, but a Xcode 11 beta made the argument mandatory for our usecase. llvm-svn: 369709
2019-08-22[lldb][NFC] Add test for target stop-hook disable/enable/deleteRaphael Isemann1-5/+28
llvm-svn: 369646
2019-08-21[test] Update test so it matches the Windows outputJonas Devlieghere1-3/+3
llvm-svn: 369595
2019-08-21When building file without debug info, include the architectureJason Molenda1-1/+5
setting in the cflags on Darwin systems. llvm-svn: 369584
2019-08-21Add char8_t support (C++20)Jonas Devlieghere3-0/+53
This patch adds support for the char8_t type introduced in C++20 char8_t. The original patch was submitted by James Blachly on the LLDB mailing list [1]. I modified the patch a bit and added a test. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-August/015393.html Differential revision: https://reviews.llvm.org/D66447 llvm-svn: 369582
2019-08-21[lldb][NFC] Merge multiple TestApropos.pyRaphael Isemann2-26/+10
That's cleaner and makes lldb-dotest no longer fail due to conflicting names. llvm-svn: 369530
2019-08-21[lldb] Add tests for 'settings remove' and fix error message typosRaphael Isemann1-0/+39
llvm-svn: 369524
2019-08-21[lldb] Add tests for setting completions and enable 'settings remove' completionRaphael Isemann1-0/+18
llvm-svn: 369521
2019-08-21[lldb][NFC] Add tests for register commandRaphael Isemann1-0/+13
llvm-svn: 369513
2019-08-21[lldb][NFC] Add tests for invalid command invocationsRaphael Isemann6-0/+93
llvm-svn: 369506
2019-08-21Update a few tests that may change the platform to save & restoreJason Molenda4-4/+31
the platform in the setUp/tearDown methods. I want to migrate the re-instatement of the correct plaform to the setUp base method but haven't had time to look at that yet, so I want to land this handful of fixes until I get to it. Differential revision: https://reviews.llvm.org/D66331 llvm-svn: 369484
2019-08-20[dotest] Don't set the DWARF version override in CFLAGS_EXTRA.Jonas Devlieghere2-6/+5
We cannot override the DWARF version in the CFLAGS_EXTRA because they are used by tests that explicitly build without debug info. Instead, we pass them through the regular CFLAGS. llvm-svn: 369477
2019-08-20[LLDB][Test] Remove `skipIfWindows` for conditional breakpoint test (NFC)Med Ismail Bennani1-8/+0
Summary: The test for conditional breakpoints on Windows was skipped because there was no expression evaluation support at the time it was written. After removing the annotation and testing it again, the test is passing. http://lists.llvm.org/pipermail/lldb-dev/2019-August/015405.html Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: stella.stamenova, jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66499 llvm-svn: 369453
2019-08-20[lldb][NFC] Test quotes when completingRaphael Isemann1-0/+26
llvm-svn: 369353
2019-08-19[lldb] Fix typo on the BreakpointLocation header and the lldbtest.py (NFC)Med Ismail Bennani1-3/+5
Summary: This commit fixes some typo I found while exploring LLDB's codebase. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66452 llvm-svn: 369313
2019-08-19[lldb-vscode] add `launchCommands` to handle launch specific commandsAlex Langford3-14/+96
Summary: This can help `lldb-vscode` handle launch commands associate with remote platform attach request have field `attachCommands` to handle attach specific commands add a corresponding one for launch request if no launch command is provided, create a new target and launch; otherwise, execute the launch command Differential Revision: https://reviews.llvm.org/D65363 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 369296
2019-08-19[lldb] Make TestIOHandlerCompletion more stable and document itRaphael Isemann1-1/+4
Instead of relying that three tabs show all completions, we should show all remaining completions which will always stop the mode where we show completions. Should fix this test on systems that somehow have more completions that our normal LLDB (as they would end up being stuck in the mode where we show completions). llvm-svn: 369293
2019-08-19[dotest] Add --dwarf-version to override the tested DWARF version.Jonas Devlieghere5-7/+22
On the matrix bot on GreenDragon [1] we want to run the test suite against different DWARF versions. The idea here is not to replace targeted tests for certain DWARF features, but rather to provide an easy way to support this configuration. [1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ Differential revision: https://reviews.llvm.org/D66370 llvm-svn: 369272
2019-08-19[lldb][NFC] Add a few more completion tests to increase test coverageRaphael Isemann1-0/+23
These tests are mostly trying to reach the different completion functions in CommandCompletions.cpp (::ArchitectureNames, ::DiskFiles, ::Modules). llvm-svn: 369249
2019-08-15Stop-hooks weren't getting called on step-out. Fix that.Jim Ingham3-0/+65
There was a little bit of logic in the StopInfoBreakpoint::PerformAction that would null out the StopInfo once we had a completed plan so that the next call to GetStopInfo would replace it with the StopInfoThreadPlan. But the stop-hooks check for whether a thread stopped for a reason didn't trigger this conversion. So I added an API to do that directly, and then called it where before we just reset the StopInfo. <rdar://problem/54270767> Differential Revision: https://reviews.llvm.org/D66241 llvm-svn: 369052
2019-08-15Change test to use uint64_t to support compiling for 32-bit architectures.Adrian Prantl1-2/+2
llvm-svn: 369034
2019-08-14Improve anonymous class heuristic in ClangASTContext::CreateRecordTypeShafik Yaghmour4-10/+15
Summary: Currently the heuristic used in ClangASTContext::CreateRecordType to identify an anonymous class is that there is that name is a nullptr or simply a null terminator. This heuristic is not accurate since it will also sweep up unnamed classes and lambdas. The improved heuristic relies on the requirement that an anonymous class must be contained within a class. Differential Revision: https://reviews.llvm.org/D66175 llvm-svn: 368937
2019-08-14[API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptrPavel Labath2-2/+17
Summary: It seems this was an unintended side-effect of D26698. AFAICT, these functions did return an empty string before that patch, and the patch contained code which attempted to ensure that, but those efforts were negated by ConstString::AsCString, which by default returns a nullptr even for empty strings. This patch: - fixes the GetOutput/Error methods to really return empty strings - adds and explicit test for that - removes a workaround in lldbtest.py, which was masking this problem from our other tests Reviewers: jingham, clayborg Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D65739 llvm-svn: 368806
2019-08-14Update Python tests for lldb-server on WindowsAaron Smith17-17/+87
Summary: Thanks to Hui Huang and reviewers for all the help with this patch! Reviewers: labath, jfb, clayborg Reviewed By: labath Subscribers: Hui, clayborg, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61687 llvm-svn: 368776
2019-08-13Initial support for native debugging of x86/x64 Windows processesAaron Smith1-5/+5
Summary: Thanks to Hui Huang and the reviewers for all the help with this patch. Reviewers: labath, Hui, jfb, clayborg, amccarth Reviewed By: labath Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63165 llvm-svn: 368759
2019-08-13[lldb][NFC] Add basic IOHandler completion testRaphael Isemann2-0/+63
We have no test coverage for the IOHandler code that is doing the completion in the command line. This is adding a pexpect-based test as a preparation for the switch to using CompletionRequest in the whole completion machinery. llvm-svn: 368679