summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Only support LLDB_BUILD_FRAMEWORK on CMake 3.7 and laterChris Bieneman2016-12-151-5/+0
| | | | | | | | | | CMake's framework target generation was unable to generate POST_BUILD steps (see: https://gitlab.kitware.com/cmake/cmake/issues/16363). It turns out working around this is really not reasonable. The more reasonable solution to me is just to not support LLDB.framework unless you are on CMake 3.7 or newer. Since CMake 3.7.1 is released that's how I'm going to handle this. llvm-svn: 289841
* [CMake] Support LLDB_TEST_CLANG in check-lldb target(s)Chris Bieneman2016-11-021-0/+4
| | | | | | This just hooks up the in-tree compiler to be optionally used when running the test suite. llvm-svn: 285839
* [CMake] Populate the build directory's frameworkChris Bieneman2016-10-311-0/+5
| | | | | | | | This ensures that the Resources and clang headers are properly symlinked in LLDB's framework. This should fix the modules-related tests when building on Darwin with CMake if you are building a framework. I have another fix coming which gets them working on Darwin if you're building liblldb instead of a framework. llvm-svn: 285651
* [Test Suite] Properly respect --framework optionChris Bieneman2016-10-311-0/+4
| | | | | | | | | | | | | | | Summary: dotest.py has a framework option that is not respected. This patch makes the framework path properly configurable via the --framework option. This patch also adds a function to the lldbtest.Base class named "hasDarwinFramework" which allows us to not rely on the host platform to determine if a framework is present. If running on Darwin, and not building a framework, this will follow the *nix code paths which are appropriate for Darwin. Reviewers: tfiala Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25886 llvm-svn: 285541
* [Test Suite] Allow overriding codesign identityChris Bieneman2016-10-211-0/+4
| | | | | | | | | | | | Summary: Not everyone names their code sign identity "lldb_codesign", so it is nice to allow this to be overridden. Reviewers: zturner, tfiala Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25714 llvm-svn: 284893
* [CMake] Don't include LLDB_TEST_COMPILER in cached variableChris Bieneman2016-10-181-2/+8
| | | | | | | | | | | | | | | Summary: CMake has no builtin mechanism for cache invalidation. As a general convention you want to not expand user-specified variables in other cached variables because they will not get updated when the user changes their specified value. This patch moves the "-C" option for dotest.py into the LLDB_TEST_COMMON_ARGS and out of the CMake cache. In order to prevent issues with out-of-date cache files on builders I've added code to scrub "-C ${LLDB_TEST_COMPILER}" out of the CMake caches, by Force writing the variable. This code can be removed in a few days once the change has trickled through CI systems. Reviewers: tfiala, labath, zturner Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25751 llvm-svn: 284551
* [CMake] Cleanup check-lldb targetsChris Bieneman2016-10-121-2/+17
| | | | | | | | | | | | | | | | | Summary: This patch adds the following fixes to the check-lldb targets: * Adds missing dependencies on lldb tools so they get built before tests execute * Adds Ninja USES_TERMINAL to the target so that the output streams to stdout as it executes * Uses a generator expression to find the lldb executable, this is more robust than constructing the path manually Reviewers: tfiala, zturner Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25490 llvm-svn: 284046
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Always rerun all tests on Windows.Zachary Turner2016-05-231-0/+3
| | | | | | | | There is flakiness somewhere in the core infrastructure on Windows, so to get the buildbot reliably green we need to mark all tests as flaky. llvm-svn: 270460
* Allow custom formatting of session log file names.Zachary Turner2016-05-171-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D20306 llvm-svn: 269793
* Fix ResourceWarning about unclosed file in use_lldb_suite_root.py.Zachary Turner2016-01-151-3/+6
| | | | llvm-svn: 257945
* Add a symbolic link from the test directory to the actual - elsewhere ↵Enrico Granata2015-12-161-0/+1
| | | | | | | | | | located - path that contains the test cases - and teach the test suite driver to resolve paths that contain symbolic links to test cases This is meant to reduce the typing that one needs to do to get from the test subdirectory to actual test cases. Now one can just do $ ./dotest.py ./testcases/<yaddayaddayadda> llvm-svn: 255741
* Remove `lldb.root` and just look for the file we care about.Zachary Turner2015-11-201-1/+1
| | | | llvm-svn: 253679
* Move go expression tests to the new location.Ryan Brown2015-11-022-134/+0
| | | | llvm-svn: 251835
* Create an expression parser for Go.Ryan Brown2015-11-022-0/+134
| | | | | | | | | | | The Go interpreter doesn't JIT or use LLVM, so this also moves all the JIT related code from UserExpression to a new class LLVMUserExpression. Differential Revision: http://reviews.llvm.org/D13073 Fix merge llvm-svn: 251820
* Add check for __main__ in dotest.py to ensure problems with multiprocessing ↵Adrian McCarthy2015-10-281-3/+4
| | | | | | on some Windows machines. llvm-svn: 251549
* Try to fix the linux buildbot.Zachary Turner2015-10-281-0/+2
| | | | | | | | It's complaining that it doesn't under the "import" command, so I guess I need this hashbang at the beginning so that it knows it's a Python script. llvm-svn: 251544
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281489-99952/+2
| | | | | | | | | | | 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
* Changes for Bug 17384Ravitheja Addepally2015-10-282-6/+9
| | | | | | | | | | | | | | | | | | | | | | | Summary: Virtual dynamic shared objects, or vdso files were not loaded for Linux OS.In Bug 17384 the call stack could not be unwinded from functions residing in the vdso object. This commit adds support for loading such files by reading the Aux vectors since a vdso is invisibily mapped to the inferiors address space and the actual file is not present in the filesystem. The presence of the vdso is detected by inspecting the Aux vector for AT_SYSINFO_EHDR tag. Reviewers: lldb-commits, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14118 llvm-svn: 251505
* Preparation for turning lldbsuite into a Python package.Zachary Turner2015-10-274-157/+64
| | | | | | | | | | | 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
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-27393-394/+394
| | | | llvm-svn: 251444
* Deprecate -m/+m dotest options in favor of test categoriesPavel Labath2015-10-2723-171/+29
| | | | | | | | | | | | | | | | | | | Summary: This change deprecates -m/+m dotest options (the options are still recognized but they print an error message pointing to the new options) and adds a new lldb-mi test category instead. To just run lldb-mi tests, use '-G lldb-mi'. To skip lldb-mi tests, use '--skip-category lldb-mi'. All lldb-mi tests are marked as such using the getCategories method on the base MiTestCaseBase class and the @lldbmi_test decorator is not needed. In case one still needs to annotate a specific test function as an lldb-mi test, one can use the @add_test_categories(['lldb-mi']) decorator to achieve that. Reviewers: tfiala, dawn, ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14060 llvm-svn: 251400
* Fix race condition in process resumePavel Labath2015-10-271-1/+0
| | | | | | | | | | | | | | | | | | Summary: Gdb-remote's async thread sent out the eBroadcastBitRunPacketSent message *before* actually sending out the continue packet. Since it's this message the actually triggers the public state transition, it could happen (and it did happen in TestAttachResume, which does an "process interrupt" right after a continue) that we attempt to stop the inferior before it was actually started (which obviously did not end well). This fixes the problem by moving the broadcast after the packet was actually sent. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14083 llvm-svn: 251399
* Change TestTypeCompletion to not rely on std::stringEnrico Granata2015-10-262-22/+43
| | | | | | On some combination of platform and c++ library, this dependency was causing the test to fail for reasons tangential to its real objective llvm-svn: 251368
* Python 3: Convert uses of `callable(x)` to `six.callable(x)`.Zachary Turner2015-10-264-9/+13
| | | | llvm-svn: 251329
* Remove use of octal literals.Zachary Turner2015-10-266-14/+14
| | | | | | | | | | | Python 3 has a different syntax for octal literals than Python 2 and they are incompatible with each other. Six doesn't provide a transparent wrapper around this, so the most sane thing to do is to not use octal literals. If you need an octal literal, use a decimal literal and if it's not obvious what the value is, provide the value in octal as a comment. llvm-svn: 251328
* Fixed the test suite on MacOSX so that ↵Greg Clayton2015-10-265-30/+18
| | | | | | | | | | "test/api/multithreaded/TestMultithreaded.py" works without errors. The problem was that the @skipIfNoSBHeaders on darwin was trying to use self.lib_dir when it hadn't been set yet. I looked at the code and places were required to set "self.lib_dir" for no real reason as all places that used it just used the LLDB_LIB_DIR environment variable. So I removed all uses of self.lib_dir and replaced them to use 'os.environ["LLDB_LIB_DIR"]'. Did the same for self.implib_dir. llvm-svn: 251315
* Wrap call to zip() in list()Zachary Turner2015-10-261-1/+1
| | | | llvm-svn: 251307
* Python3 - Change sys.maxint to sys.maxsize.Zachary Turner2015-10-264-7/+7
| | | | | | | | | Python3 has no analogue to sys.maxint since ints in Python 3 have arbitrary size. However, the distinction was not actually important in any of these cases, and in a few cases using maxint was already a bug to begin with. llvm-svn: 251306
* Convert `long` to `int`, and portably detect all integral types.Zachary Turner2015-10-265-9/+13
| | | | llvm-svn: 251305
* Python3 - Change `dict.has_key(x)` to `x in dict`Zachary Turner2015-10-262-2/+2
| | | | llvm-svn: 251304
* Convert deprecated unittest method names.Zachary Turner2015-10-2619-55/+55
| | | | | | | Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. llvm-svn: 251303
* Fix usages of range() and xrange() for Python 3.Zachary Turner2015-10-268-16/+16
| | | | llvm-svn: 251302
* Port the python api decorator to use test categoriesPavel Labath2015-10-2696-262/+235
| | | | | | | | | | | | | | | | | | Summary: Per discussions on the mailing list, I have implemented a decorator which annotates individual test methods with categories. I have used this framework to replace the '-a' and '+a' command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test decorator (now @add_test_categories('pyapi')). The test suite now gives an error message suggesting the new options if the user specifies the deprecated +/-a switches. If the general direction is good, I will follow this up with other switches. Reviewers: tberghammer, tfiala, granata.enrico, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14020 llvm-svn: 251277
* [lldb-mi] Fix expansion of anonymous structures and unionsDawn Perchik2015-10-242-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of type: struct S { union { int i1; unsigned u1; }; union { int i2; unsigned u2; }; }; had been impossible to evaluate in lldb-mi, because MI assigns '??' as the variable name to each of the unnamed unions after "-var-list-children" command. Also '??' incorrectly goes to 'exp' field which is treated by IDE as a structure field name and is displayed in watch window. The patch fixes this returning empty string as type name for unnamed union and assigning $N to variable name, where N is the field number in the parent entity. Patch from evgeny.leviant@gmail.com Reviewed by: clayborg, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13947 llvm-svn: 251176
* Lower the depth of the recursion in this test since it would on occasion ↵Enrico Granata2015-10-241-1/+1
| | | | | | timeout and add noise to test runs llvm-svn: 251161
* [TestBreakpointCommand] Fix after r251121Siva Chandra2015-10-231-3/+3
| | | | | | | | | | | | | | | Summary: "from __future__ import print_function" was added to the test file but not to the embedded interpreter. This change uses file.write instead to avoid all problems with print. Reviewers: zturner Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D14029 llvm-svn: 251150
* Make uses of unicode literals portable.Zachary Turner2015-10-234-17/+27
| | | | | | | | | Six provides six.u() which resolves to either u"" or "" depending on Python version, and and six.unichr() which resolves to either unichr() or chr() depending on Python version. Use these functions anywhere where we were relying on u"" or unichr(). llvm-svn: 251139
* Python3 - Wrap more statements in calls to list()Zachary Turner2015-10-2311-21/+21
| | | | llvm-svn: 251129
* Remove argparse_compat.Zachary Turner2015-10-232-95/+7
| | | | | | We don't support versions of Python less than 2.7 llvm-svn: 251128
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-23404-470/+1269
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Enable the libc++ tests on linuxPavel Labath2015-10-239-18/+18
| | | | | | | | | | | | | | | Summary: The list of loaded modules which skip_if_library_missing is depending on is not available on linux until after we run the target. This causes the tests to be wrongfully skipped. This commit moves the skip call after the run command. Reviewers: granata.enrico, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13985 llvm-svn: 251102
* [lldb-mi] display summary for simple types + refactor (use lldb formatting ↵Dawn Perchik2015-10-232-8/+8
| | | | | | | | | | | | | | | for all cases) Previously, lldb did not use type summaries for simple types with no children (like function pointers). This patch enables MI to use lldb type summaries for evaluation of all types of objects, so MI own formatters are no longer needed. Patch from evgeny.leviant@gmail.com Reviewed by: abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13799 llvm-svn: 251082
* Python 3 porting - Wrap returns from map() in list()Zachary Turner2015-10-224-11/+11
| | | | | | | | Under Python 2 this has no effect, since map() returns a list. In Python 3 map() returns an iterable, so wrapping in a list is necessary to keep the same semantics. llvm-svn: 251060
* Update every test to import `lldb_shared`.Zachary Turner2015-10-22396-2790/+774
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* Remove special case logic for finding 3rd party libsZachary Turner2015-10-221-5/+0
| | | | llvm-svn: 251047
* Move third party libraries to lldb/third_partyZachary Turner2015-10-2268-17936/+0
| | | | llvm-svn: 251046
* Fix libstdc++ data formatters on Ubuntu 15.10 x86_64Todd Fiala2015-10-223-15/+17
| | | | | | See http://reviews.llvm.org/D13964 for details. llvm-svn: 250965
* Fix typo so that "./dotest.py --results-formatter=curses_results.Curses ↵Greg Clayton2015-10-211-1/+1
| | | | | | --results-file=/dev/stdout" works again. llvm-svn: 250952
* [SBValue] Add a method GetNumChildren(uint32_t max)Siva Chandra2015-10-213-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Along with this, support for an optional argument to the "num_children" method of a Python synthetic child provider has also been added. These have been added with the following use case in mind: Synthetic child providers currently have a method "has_children" and "num_children". While the former is good enough to know if there are children, it does not give any insight into how many children there are. Though the latter serves this purpose, calculating the number for children of a data structure could be an O(N) operation if the data structure has N children. The new method added in this change provide a middle ground. One can call GetNumChildren(K) to know if a child exists at an index K which can be as large as the callers tolerance can be. If the caller wants to know about children beyond K, it can make an other call with 2K. If the synthetic child provider maintains state about it counting till K previosly, then the next call is only an O(K) operation. Infact, all calls made progressively with steps of K will be O(K) operations. Reviewers: vharron, clayborg, granata.enrico Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D13778 llvm-svn: 250930
OpenPOWER on IntegriCloud