summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbtest.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-2838/+0
| | | | | | | | | | | 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
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251444
* Deprecate -m/+m dotest options in favor of test categoriesPavel Labath2015-10-271-28/+0
| | | | | | | | | | | | | | | | | | | 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
* Python 3: Convert uses of `callable(x)` to `six.callable(x)`.Zachary Turner2015-10-261-4/+6
| | | | llvm-svn: 251329
* Remove use of octal literals.Zachary Turner2015-10-261-1/+1
| | | | | | | | | | | 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-261-15/+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
* Port the python api decorator to use test categoriesPavel Labath2015-10-261-27/+11
| | | | | | | | | | | | | | | | | | 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
* Python3 - Wrap more statements in calls to list()Zachary Turner2015-10-231-2/+2
| | | | llvm-svn: 251129
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-1/+1
| | | | | | | | | | | | | 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
* Python 3 porting - Wrap returns from map() in list()Zachary Turner2015-10-221-1/+1
| | | | | | | | 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
* Use six to portably handle module renames in Python 2 and 3Zachary Turner2015-10-211-11/+7
| | | | llvm-svn: 250915
* Use six to portably assign metaclasses in Python 2 and 3.Zachary Turner2015-10-201-5/+7
| | | | llvm-svn: 250859
* Convert print statements to print function calls.Zachary Turner2015-10-191-56/+58
| | | | | | | | | This patch was generating by running `2to3` on the files in the lldb/test directory. This patch should be NFC, but it does introduce the `from __future__ import print_function` line, which will break future uses of the print statement. llvm-svn: 250763
* Factor the execution of the test method into a separate function to ensure ↵Adrian McCarthy2015-10-151-0/+6
| | | | | | | | that any exceptions that are thrown go out of scope and no longer hold references to SB objects that need to be freed before teardown. Differential Revision: http://reviews.llvm.org/D13788 llvm-svn: 250467
* dotest.py: Remove useless AttributeError catchesPavel Labath2015-10-121-45/+18
| | | | | | | | | | | | | | | Summary: Test decorators were ignoring AttributeError exceptions. These were introduced three years ago, and copied to all decorators. They seem to serve no purpose and removing them produces no errors. Given that they have prevented us from noticing the problem in r249819, I am removing them. Reviewers: zturner, tfiala Subscribers: iancottrell, lldb-commits Differential Revision: http://reviews.llvm.org/D13583 llvm-svn: 250038
* Fix a test that should only be run with a dSYM file by adding @skipIfDwarf ↵Greg Clayton2015-10-071-0/+3
| | | | | | and using a new @skipIfDWO. llvm-svn: 249601
* Fix race condition in the working directory cleanup codeTamas Berghammer2015-10-071-4/+9
| | | | llvm-svn: 249549
* Remove working directory from remote platform in the test suiteTamas Berghammer2015-10-071-0/+7
| | | | | | | | | Previously we haven't cleaned up the working directory we created on the remote platform and because of it we run out of storage on some android device/emulator (caused by the 2x increase of the number of test cases because of dwo). llvm-svn: 249541
* Run tests with dwo symbol filesTamas Berghammer2015-10-071-2/+44
| | | | | | | | | | dwo symbol files are generated when code compiled with the "-gsplit-dwarf" command option (https://gcc.gnu.org/wiki/DebugFission). This CL modifies the test system to run tests with inferiors compile with the "-gsplit-dwarf" Differential revision: http://reviews.llvm.org/D13300 llvm-svn: 249530
* Modify minimumg go version to 1.4.0 for tests.Todd Fiala2015-10-061-6/+3
| | | | llvm-svn: 249477
* Bungled my last change in a tweak.Todd Fiala2015-10-061-2/+1
| | | | | | | I took out a skip_test check that wasn't necessary, but didn't fully yank it out. Would break a normal go install. llvm-svn: 249448
* Address failing Go tests on go version from Ubuntu 14.04Todd Fiala2015-10-061-1/+23
| | | | | | | | | Go tests fail on Ubuntu 14.04's go1.2.1. This change puts a minimum go version in the skipUnlessGoInstalled() decorator of go1.3.0. Go maintainers are encouraged to modify as needed. For now this fixes failing tests on Ubuntu 14.04 x86_64 buildbots with stock distro go installed. llvm-svn: 249446
* Do not attempt to join the remote paths if none existEnrico Granata2015-10-021-1/+1
| | | | llvm-svn: 249210
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-23/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Add first tests for mini-dump debugging.Adrian McCarthy2015-09-161-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D12888 llvm-svn: 247829
* Add a TypeSystem for GoRyan Brown2015-09-141-0/+32
| | | | | | | | Add GoASTContext and DWARFASTParserGo to support go. Differential Revision: http://reviews.llvm.org/D12585 llvm-svn: 247629
* Fix a thinko causing test logs for crashes to not get written.Zachary Turner2015-09-111-1/+1
| | | | llvm-svn: 247479
* XFAIL TestBuiltinTrap on android-arm (gcc bug)Tamas Berghammer2015-09-071-2/+3
| | | | llvm-svn: 246971
* Mark TestCreateDuringInstructionStep as flaky on android armPavel Labath2015-09-071-0/+3
| | | | llvm-svn: 246966
* Sleep-and-retry after a failure to delete a log file, which may be because ↵Adrian McCarthy2015-09-041-1/+11
| | | | | | | | antimalware is holding the handle to the just-created file. Differential Revision: http://reviews.llvm.org/D12641 llvm-svn: 246870
* Don't throw an exception when module cleanup fails.Zachary Turner2015-08-261-5/+13
| | | | | | | Just because one test fails to clean up correctly, it should not prevent other tests from attempting to run. llvm-svn: 246063
* Skip TestCreateDuringInstructionStep on android aarch64Pavel Labath2015-08-201-18/+19
| | | | | | we are unable to step through _M_start_thread due to atomic instruction sequences. llvm-svn: 245552
* Make skipUnlessArch decorator actually skip instead of XFAIL.Zachary Turner2015-08-141-5/+18
| | | | llvm-svn: 245127
* [LLDB][MIPS] Added expected failure for "test disassembler settings"Mohit K. Bhakkad2015-07-301-0/+5
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits. Differential Revision: http://reviews.llvm.org/D11562 llvm-svn: 243622
* Make DWARF at_comp_dir symbolic links configurable via ↵Oleksiy Vyalov2015-07-291-0/+4
| | | | | | | | plugin.symbol-file.dwarf.comp-dir-symlink-paths setting. http://reviews.llvm.org/D11586 llvm-svn: 243580
* XFAIL watchpoint tests on Android arm/aarch64Tamas Berghammer2015-07-221-6/+9
| | | | | | Differential revision: http://reviews.llvm.org/D11409 llvm-svn: 242887
* Apply Android -pie switch to buildDefault as well.Chaoren Lin2015-07-181-5/+11
| | | | | | | | | | Reviewers: ovyalov Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D11317 llvm-svn: 242598
* Detect if necessary to build inferior with -pie for Android.Chaoren Lin2015-07-171-19/+31
| | | | | | | | | | | | | | | Summary: - Add target_is_android check (with cached results). - Make android_device_api also cache results. - Also removes the need to pass --env OS=Android when testing against Android. Reviewers: sivachandra, tberghammer, clayborg, danalbert Subscribers: chaoren, tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D11309 llvm-svn: 242580
* Check if altsep exists before replace.Chaoren Lin2015-07-171-1/+2
| | | | llvm-svn: 242576
* Handle altsep ('/' on Windows) in compiler path for log files.Chaoren Lin2015-07-171-0/+1
| | | | | | | | | | Reviewers: chying Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11312 llvm-svn: 242575
* Fix _LocalProcess.terminate on Windows.Adrian McCarthy2015-07-071-12/+9
| | | | llvm-svn: 241589
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-16/+6
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Run teardown and setup before retry for expectedFlakey testsYing Chen2015-07-011-1/+6
| | | | | | | | | | | | | | | | | | Summary: If test is decorated with expectedFlakey*, run teardown and setup before retry Don't run retry if the test is already decorated with xfail or skip Test Plan: Mark TestMultithreaded.test_sb_api_listener_event_process_state as expectedFlakey Run ./dotest.py -p TestMultithreaded.py -A x86_64 -C gcc4.9.2 Reviewers: vharron, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10830 llvm-svn: 241202
* Added expectedFlakey test decoratorVince Harron2015-06-261-0/+62
| | | | | | | | | | | | | | | | | SUMMARY Flakey tests get two chances to pass Also, switched a bunch of tests to use new decorator. TEST PLAN Add one of these decorators to a test Edit a test to pass on the first invocation, confirm test appears as pass Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error Differential Revision: http://reviews.llvm.org/D10721 llvm-svn: 240789
* Remove old local-only linux debugging codePavel Labath2015-06-241-9/+0
| | | | | | | | | | | | | | | | | | | | Summary: Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using it; and b) the remote debugging path is much more stable. This commit removes the local-only linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new architecture as well and then this code can be removed completely. Test Plan: Test suite passes via remote stub. Reviewers: emaste, vharron, ovyalov, clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10661 llvm-svn: 240543
* [TestLoadUnload] Enable for Android while skipping it for other remotes.Siva Chandra2015-06-171-0/+22
| | | | | | | | | | | | | | | | | | Summary: This change adds all the necessary infrastructure required to selectively enable and make TestLoadUnload work for Android. One test, which tests the module search paths, is still kept disabled for remote as search paths (because of module caching) are local anyway. Reviewers: tberghammer Reviewed By: tberghammer Subscribers: emaste, lldb-commits, tberghammer Differential Revision: http://reviews.llvm.org/D10469 llvm-svn: 239965
* XFail pexpect tests for Windows hosts.Chaoren Lin2015-06-091-0/+9
| | | | | | | | | | Reviewers: vharron, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10340 llvm-svn: 239414
* Skip TestInferiorChanged if host platform is windows.Chaoren Lin2015-06-081-0/+14
| | | | | | | | | | | | | | Summary: Opened files on Windows cannot be modified, so this test doesn't make sense. Reviewers: ovyalov, zturner, flackr, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10295 llvm-svn: 239359
* Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.Chaoren Lin2015-06-061-2/+2
| | | | | | | | | | | | | | Summary: Updated `append_to_remote_wd` to work for both remote and local. Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10288 llvm-svn: 239203
* [TestGdbRemoteAbort] Skip on API 16 Android devicesSiva Chandra2015-06-051-13/+26
| | | | | | | | | | | | | | | | Summary: This change also adds the infrastructure required to specify the API levels for which tests should be skipped. Reviewers: chying, labath Reviewed By: labath Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10282 llvm-svn: 239183
OpenPOWER on IntegriCloud