summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/interpreter
Commit message (Collapse)AuthorAgeFilesLines
* Fix test breakage caused by r374424Lawrence D'Anna2019-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The build directory name is based on the test method name, so having two test methods with the same name in the same test file is a problem, even if they're in different test classes. On linux and darwin this conflict can go unnoticed, but windows has different filesystem semantics and it will fail when one process tries to delete files still held open by another. The problem is fixed just by changing the name of one of the test methods. Reviewers: JDevlieghere, jasonmolenda, labath, stella.stamenova Reviewed By: stella.stamenova Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68951 llvm-svn: 374803
* update TestRunCommandInterpreterAPI to use SBFileLawrence D'Anna2019-10-101-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If you look at what this test is doing, it's actually quite mysterious why it works at all. It sets the input file inside a "with open". As soon as the with block ends, that file will be closed. And yet somehow LLDB reads commands from it anyway. What's actually happening is that the file descriptor gets dup'd when something inside LLDB calls File::GetStream(). I think it's fair to say that what this test is doing is illegal and it has no right to expect it to work. This patch updates the test with two cases. One uses the SBFile api, and actually transfers ownership of the original file descriptor to the debugger. The other just uses the old FILE* API, but in a sane way. I also set NO_DEBUG_INFO_TESTCASE, because this test doesn't use any debug info and doesn't need to run three times. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: aprantl, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68738 llvm-svn: 374424
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptrPavel Labath2019-08-141-0/+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
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-021-1/+0
| | | | llvm-svn: 367663
* Make SBDebugger.RunCommandInterpreter callable from Python.Jim Ingham2019-05-151-0/+38
| | | | | | | | Authored by: Lukas Boger Differential Revision: https://reviews.llvm.org/D61602 llvm-svn: 360730
* Wrap all references to build artifacts in the LLDB testsuite (NFC)Adrian Prantl2018-01-191-1/+1
| | | | | | | | | in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-041-0/+2
| | | | llvm-svn: 259838
* Remove `use_lldb_suite` from the package, and don't import it anymore.Zachary Turner2015-11-031-1/+1
| | | | | | | | | | | | | | | | This module was originally intended to be imported by top-level scripts to be able to find the LLDB packages and third party libraries. Packages themselves shouldn't need to import it, because by the time it gets into the package, the top-level script should have already done this. Indeed, it was just adding the same values to sys.path multiple times, so this patch is essentially no functional change. To make sure it doesn't get re-introduced, we also delete the `use_lldb_suite` module from `lldbsuite/test`, although the original copy still remains in `lldb/test` llvm-svn: 251963
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | For convenience, we had added the folder that dotest.py was in to sys.path, so that we could easily write things like `import lldbutil` from anywhere and any test. This introduces a subtle problem when using Python's package system, because when unittest2 imports a particular test suite, the test suite is detached from the package. Thus, writing "import lldbutil" from dotest imports it as part of the package, and writing the same line from a test does a fresh import since the importing module was not part of the same package. The real way to fix this is to use absolute imports everywhere. Instead of writing "import lldbutil", we need to write "import lldbsuite.test.util". This patch fixes up that and all other similar cases, and additionally removes the script directory from sys.path to ensure that this can't happen again. llvm-svn: 251886
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-283-0/+84
This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
OpenPOWER on IntegriCloud