[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[lldb] Skip several lldb tests that are flaky on WindowsThese tests fail every 10 or so runs on Windows causing both local failures as well as buildbot failures.Differential Revision: https://rev
[lldb] Skip several lldb tests that are flaky on WindowsThese tests fail every 10 or so runs on Windows causing both local failures as well as buildbot failures.Differential Revision: https://reviews.llvm.org/D111659
[lldb] Un-XFAIL TestAutoInstallMainExecutable on Windows
[lldb] Rewrite TestAutoInstallMainExecutable logicThe test uses debug info from one binary to debug a different one. Thisdoes not work on macos, and its pure luck that it works elsewhere (thevari
[lldb] Rewrite TestAutoInstallMainExecutable logicThe test uses debug info from one binary to debug a different one. Thisdoes not work on macos, and its pure luck that it works elsewhere (thevariable that it inspects happens to have the same address in both).The purpose of this test is to verify that lldb has not overwritten thetarget executable. That can be more easily achieved by checking the exitcode of the binary, so change the test to do that.Also remove the llgs_test decorator, as it's preventing the test fromrunning on macos. All the test needs is the platform functionality oflldb-server, which is available everywhere.
[lldb] Add llgs_test decorator back to TestAutoInstallMainExecutableThis got removed in 68bb51acd572735d80d20adb2c2fc51a5cbbd88e and this enabledthe test on macOS (where it just causes lldb-server
[lldb] Add llgs_test decorator back to TestAutoInstallMainExecutableThis got removed in 68bb51acd572735d80d20adb2c2fc51a5cbbd88e and this enabledthe test on macOS (where it just causes lldb-server to crash). Re-adding thedecorator to get the tests passing again.
[lldb] Fix TestAutoInstallMainExecutable.pyFix the test to account for recent test infrastructure changes, and makeit run locally to increase the chances of it continuing to work in thefuture.
[lldb/test] Reduce boilerplate in lldb-server testsNearly all of our lldb-server tests have two flavours (lldb-server anddebugserver). Each of them is tagged with an appropriate decorator, andeac
[lldb/test] Reduce boilerplate in lldb-server testsNearly all of our lldb-server tests have two flavours (lldb-server anddebugserver). Each of them is tagged with an appropriate decorator, andeach of them starts with a call to a matching "init" method. The initcalls are mandatory, and it's not possible to meaningfully combine themwith a different decorator.This patch leverages the existing decorators to also tag the tests withthe appropriate debug server tag, similar to how we do with debug infoflavours. This allows us to make the "init" calls from inside the commonsetUp method.
[lldb] Fix a couple of remote llgs testsinit_llgs_test no longer takes an argumentbut these two were not updated.Also fix some mistakes in TestAutoInstallMainExecutableto get it passing again.
[lldb] Fix a couple of remote llgs testsinit_llgs_test no longer takes an argumentbut these two were not updated.Also fix some mistakes in TestAutoInstallMainExecutableto get it passing again.Reviewed By: JDevlieghere, labathDifferential Revision: https://reviews.llvm.org/D91612
[lldb] Use target.GetLaunchInfo() instead of creating an empty one.Update tests that were creating an empty LaunchInfo instead of using theone coming from the target. This ensures target propertie
[lldb] Use target.GetLaunchInfo() instead of creating an empty one.Update tests that were creating an empty LaunchInfo instead of using theone coming from the target. This ensures target properties are honored.
[lldb/Test] Always set the cleanupSubprocesses tear down hookAlways clean up subprocesses on tear down instead of relying on thecaller to do so. This is not only less error prone but also means th
[lldb/Test] Always set the cleanupSubprocesses tear down hookAlways clean up subprocesses on tear down instead of relying on thecaller to do so. This is not only less error prone but also means thetests can be more concise.Differential revision: https://reviews.llvm.org/D83787
[lldb/Test] Introduce "assertSuccess"Summary:A lot of our tests do 'self.assertTrue(error.Success()'. The problemwith that is that when this fails, it produces a completely uselesserror message
[lldb/Test] Introduce "assertSuccess"Summary:A lot of our tests do 'self.assertTrue(error.Success()'. The problemwith that is that when this fails, it produces a completely uselesserror message (False is not True) and the most important piece ofinformation -- the actual error message -- is completely hidden.Sometimes we mitigate that by including the error message in the "msg"argument, but this has two additional problems:- as the msg argument is evaluated unconditionally, one needs to be careful to not trigger an exception when the operation was actually successful.- it requires more typing, which means we often don't do itassertSuccess solves these problems by taking the entire SBError objectas an argument. If the operation was unsuccessful, it can format areasonable error message itself. The function still accepts a "msg"argument, which can include any additional context, but this context nowdoes not need to include the error message.To demonstrate usage, I replace a number of existing assertTrueassertions with the new function. As this process is not easilyautomatable, I have just manually updated a representative sample. Insome cases, I did not update the code to use assertSuccess, but I wentfor even higher-level assertion apis (runCmd, expect_expr), as these areeven shorter, and can produce even better failure messages.Reviewers: teemperor, JDevlieghereSubscribers: arphaman, lldb-commitsTags: #lldbDifferential Revision: https://reviews.llvm.org/D82759
[lldb][testsuite] Create a SBDebugger instance for each testSome tests set settings and don't clean them up, this leads to side effects in other tests.The patch removes a global debugger instance
[lldb][testsuite] Create a SBDebugger instance for each testSome tests set settings and don't clean them up, this leads to side effects in other tests.The patch removes a global debugger instance with a per-test debugger to avoid such effects.From what I see, lldb.DBG was needed to determine the platform before a test is run,lldb.selected_platform is used for this purpose now. Though, this required adding a new functionto the SBPlatform interface.Differential Revision: https://reviews.llvm.org/D74903
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done```lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.Reviewers: labath, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151