summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix an issue where LLDB would truncate summaries for string types without ↵Enrico Granata2015-11-041-1/+20
| | | | | | producing any evidence thereof llvm-svn: 252018
* Introduce seven.cmp_ and use it instead of cmpZachary Turner2015-11-031-1/+2
| | | | llvm-svn: 251982
* Remove `use_lldb_suite` from the package, and don't import it anymore.Zachary Turner2015-11-03392-413/+391
| | | | | | | | | | | | | | | | 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
* Python 3 - Don't use `commands` module anymore.Zachary Turner2015-11-034-11/+11
| | | | | | | | | | The `commands` module was deprecated in 2.7 and removed in 3.x. As a workaround, we introduce a new module `seven` in lldbsuite.support, and write helper functions in there that delegate to the commands module if it is available, and re-implement their functionality for cases where it is not available. llvm-svn: 251959
* Fix flakyness in TestWatchLocationWithWatchSetPavel Labath2015-11-031-2/+4
| | | | | | Two threads in the test can hit the watchpoint simultaneously. Fix the test to account for that. llvm-svn: 251954
* Skip TestBacktraceAll on android-armTamas Berghammer2015-11-031-1/+4
| | | | | | | The android compiler can't compile the inferior because of an issue in the standard library. llvm-svn: 251951
* Leave TestAttachResume as flakey on linuxPavel Labath2015-11-031-0/+1
| | | | | | there must be (at least) one more race hidden there... llvm-svn: 251950
* Fix race during process detachPavel Labath2015-11-031-1/+0
| | | | | | | | | | | | | | | | Summary: The code which was preventing the usage of the OS plugin while detach is in progress also prevented us to update the thread list correctly. This resulted in an empty thread list, which confused the detaching logic. Change the condition do only do what it says (disable the usage of the OS plugin). Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14201 llvm-svn: 251932
* Changes for Bug 25251Ravitheja Addepally2015-11-035-6/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The solution to bug 24074,rL249673 needed to parse the function information from the Dwarf in order to set the SymbolContext. For that, GetFunction was called for the parent in GetTypeForDIE, which parses the ChildParameters and in the flow, GetTypeForDIE was called for one of the sibling die and so an infinite loop was triggered by calling GetFunction repeatedly for the same function. The changes in this revision modify the GetTypeForDIE to only resolve the function context in the Type Lookup flow and so prevent the infinite loop. A testcase has also been added to check for regression in the future and a test vector had been added to the testcase of 24074. Reviewers: jingham, tberghammer, clayborg Differential Revision: http://reviews.llvm.org/D14202 llvm-svn: 251917
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-03414-772/+815
| | | | | | | | | | | | | | | | | | | | 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
* Fix usage of removed decorator in TestExpressionsPavel Labath2015-11-031-1/+1
| | | | llvm-svn: 251880
* Revert "Make new dotest.py executable"Pavel Labath2015-11-021-0/+0
| | | | | | This was a misunderstanding on my part. The new dotest.py is not meant to be executed directly. llvm-svn: 251863
* Revert "Remove the __import__ hack of lldbtest_config."Pavel Labath2015-11-021-2/+5
| | | | | | The hack still seems to be necessary. Putting it back in until we figure out why. llvm-svn: 251862
* This test case does not actually depend on Cocoa; Foundation is good enoguhEnrico Granata2015-11-022-2/+2
| | | | llvm-svn: 251861
* Move go expression tests to the new location.Ryan Brown2015-11-022-0/+134
| | | | llvm-svn: 251835
* [dosep] Fix-up callers of process_dir, after it got its argument removedPavel Labath2015-11-021-2/+2
| | | | llvm-svn: 251830
* Remove the __import__ hack of lldbtest_config.Zachary Turner2015-11-021-5/+2
| | | | | | | | I think the underlying problem was fixed by r251819, but I can't reproduce the problem. So this is to check whether it does in fact fix the problem. llvm-svn: 251822
* Make dosep correctly invoke the top-level script when forking outZachary Turner2015-11-022-6/+6
| | | | | | | | | | | | | | | | | | | | packages/Python/lldbsuite is now a Python package, and it relies on its __init__.py being called to do package-level initialization. If you exec packages/Python/lldbsuite/dotest.py directly, you won't get this package level initialization, and things will fail. But without this patch, this is exactly what dosep itself does. To launch the multi-processing fork, it was hardcoding a path to dotest.py and exec'ing it from inside the package. The fix here is to get the path of the top-level script, and then exec'ing that instead. A more robust solution would involve refactoring the code so that dosep execs some internal script that imports lldbsuite, but that's a bit more involved. Differential Revision: http://reviews.llvm.org/D14157 Reviewed by: Todd Fiala llvm-svn: 251819
* Handle the options and parameters separator in every MI commandHafiz Abid Qadeer2015-11-021-0/+4
| | | | | | | | | | | | | | | | | | | Summary: As per the following link, the "--" separator can appear between the options and parameters of any MI command. Previously this separator was only handled by the `-data-disassemble` MI command. I have moved the relevant code into `CMICmdBase` so that any MI command can handle the aforementioned separator. https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Input-Syntax.html#GDB_002fMI-Input-Syntax Reviewers: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14197 llvm-svn: 251793
* Harden this test case to do the right thing in the face of compiler changesEnrico Granata2015-10-312-2/+8
| | | | llvm-svn: 251732
* Mark another TestEvents test as flaky on linuxPavel Labath2015-10-301-0/+1
| | | | | | | I don't think anything has changed recently - the test was always flaky, but only very rarely. Still, it is causing noise in the buildbots. llvm-svn: 251699
* Make new dotest.py executablePavel Labath2015-10-301-0/+0
| | | | llvm-svn: 251684
* Some test cases that need the lldbExec path were failing because lldbExec ↵Enrico Granata2015-10-301-1/+4
| | | | | | | | | | was turning out to be None even though it was being validly set by dotest.py It turns out that lldbtest_config was being imported locally to "lldbsuite.test" instead of globally, so when the test cases got individually brought by a global import via __import__ by unittest2, they did not see the lldbtest_config import, and ended up importing a new separate copy of it, with lldbExec unset This is a simple hackaround that brings lldbtest_config to global visibility and makes sure the configuration data is correctly shared llvm-svn: 251678
* Add a --offset option to memory read that allows one to specify, given a ↵Enrico Granata2015-10-292-0/+10
| | | | | | type, how many sizeof(type) bytes to speak before starting to read memory llvm-svn: 251668
* Give the test class it's own name (it was reusing the name from ↵Jim Ingham2015-10-291-1/+1
| | | | | | TestCompletions.py). llvm-svn: 251657
* Better handle the arguments common to all MI commands.Hafiz Abid Qadeer2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: I observed that eclipse was passing --thread-group for many other commands then we are currently handling. Looking at the MI documentation, the following link states that each MI command accept the --thread and --frame option. Looking at the GDB implementation, it seems that apart from these 2, --thread-group is also handled the same way. https://sourceware.org/gdb/onlinedocs/gdb/Context-management.html#Context-management So instead of handling those arguments in every comamnds, I have moved them into the base class and removed them from elsewhere. Now any command can use these arguments. The patch seems big but most of the changes are mechanical. Reviewers: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14177 llvm-svn: 251636
* Fix flakyness in TestChangeProcessGroupPavel Labath2015-10-291-3/+8
| | | | | | | | | | | The test was verifying that the pid of the child is not equal to its process group by searching for text substrings. This failed in the rare cases when the pid actually *was* a substring of the process group (even though they were not equal). Change the test to use SB API and do proper numeric comparisons. llvm-svn: 251626
* Leave TestAttachResume as flakey on linuxPavel Labath2015-10-291-0/+1
| | | | | | there must be (at least) one more race hidden there... llvm-svn: 251590
* Skip this test is the test suite is running in a mode where it has no ↵Enrico Granata2015-10-281-6/+9
| | | | | | WindowServer access llvm-svn: 251559
* Mark TestHelloWorld and TestInferiorAssert.py as XFAIL due llvm.org/pr25338.Oleksiy Vyalov2015-10-282-0/+6
| | | | llvm-svn: 251542
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281491-0/+99979
| | | | | | | | | | | 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
* Fix line endings to be LF instead of CRLF.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251462
* Preparation for turning lldbsuite into a Python package.Zachary Turner2015-10-271-0/+1
The idea behind this patch is to expose the meat of LLDB's Python infrastructure (test suite, scripts, etc) as a single package. This makes reusability and code sharing among sub-packages easy. Differential Revision: http://reviews.llvm.org/D14131 llvm-svn: 251460
OpenPOWER on IntegriCloud