summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-28150-8310/+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
* Changes for Bug 17384Ravitheja Addepally2015-10-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-2741-41/+41
| | | | llvm-svn: 251444
* Python3 - Change sys.maxint to sys.maxsize.Zachary Turner2015-10-263-5/+5
| | | | | | | | | 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-261-2/+2
| | | | llvm-svn: 251305
* Convert deprecated unittest method names.Zachary Turner2015-10-262-6/+6
| | | | | | | Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. llvm-svn: 251303
* Port the python api decorator to use test categoriesPavel Labath2015-10-2640-106/+106
| | | | | | | | | | | | | | | | | | 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
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-2341-191/+276
| | | | | | | | | | | | | 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
* Update every test to import `lldb_shared`.Zachary Turner2015-10-2241-308/+81
| | | | | | | | | | | | | | | | | | | | | 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
* Use six to portably handle module renames in Python 2 and 3Zachary Turner2015-10-211-2/+4
| | | | llvm-svn: 250915
* Skip hanging watchpoint test on Windows (rather than just xfailing).Adrian McCarthy2015-10-161-1/+1
| | | | llvm-svn: 250576
* Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.Adrian McCarthy2015-10-131-0/+3
| | | | | DifferentialRevision: http://reviews.llvm.org/D13679 llvm-svn: 250188
* [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPSMohit K. Bhakkad2015-10-051-0/+1
| | | | | | | | Reviewers: jaydeep. Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D13335 llvm-svn: 249299
* Merge dwarf and dsym testsTamas Berghammer2015-09-3042-1140/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove expectedFailureFreeBSD from passing TestChangeValueAPI testEd Maste2015-09-231-1/+0
| | | | | | | | | | This test used fail intermittently, but now passes consistently on FreeBSD in local runs. We'll investigate further if it's intermittent on the FreeBSD buildbot, once it's restored. llvm.org/pr15039 llvm-svn: 248410
* Remove expectedFailureFreeBSD from passing testEd Maste2015-09-221-1/+0
| | | | | | | | | HelloWorldTestCase::test_with_dwarf_and_process_launch_api passes consistently for me and for John Wolfe. llvm.org/pr21620 llvm-svn: 248269
* Last set of XFAILs for Windows.Zachary Turner2015-09-163-0/+3
| | | | llvm-svn: 247825
* Marked TestEvents test as flakey on Linux.Todd Fiala2015-09-141-1/+1
| | | | | | | It's passing all the time for me (50/50), and was passing what looks like 9/10 times for the originator. llvm-svn: 247639
* Fixes lldb-server commandline test xpass for OS X and Linux; resolves ↵Todd Fiala2015-09-141-2/+0
| | | | | | llvm.org/pr20273 llvm-svn: 247605
* Remove expectedFailureFreeBSD from passing test_with_dwarf_formatters_apiEd Maste2015-09-141-1/+0
| | | | | | llvm.org/pr24282 llvm-svn: 247563
* XFAIL miscellaneous tests on windows.Zachary Turner2015-09-116-0/+6
| | | | | | llvm.org/pr24778 llvm-svn: 247460
* XFAIL some more tests related to value apiZachary Turner2015-09-113-0/+3
| | | | | | llvm.org/pr24772 llvm-svn: 247458
* Exception registers aren't supported outside of DarwinEd Maste2015-09-081-1/+0
| | | | | | Apply test update from r234992 to FreeBSD llvm-svn: 247009
* XFAIL more watchpoint tests on Windows.Zachary Turner2015-09-021-0/+1
| | | | | | llvm.org/pr24446 llvm-svn: 246725
* XFAIL TestHelloWorld on Windows.Zachary Turner2015-09-011-0/+2
| | | | | | https://llvm.org/pr24600 llvm-svn: 246569
* Skip test which is causing ERRORs in dotest.py after r237053Dawn Perchik2015-08-261-0/+1
| | | | | | | | | | | | This test runs fine on its own, but leaves python in a bad state to where all tests that run after it error out. See llvm.org/pr24575. This resolves the concerns raised in http://reviews.llvm.org/rL237053. Reviewed by: clayborg, ted Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12329 llvm-svn: 246043
* [ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclarationSiva Chandra2015-08-181-0/+1
| | | | | | | | | | | | | | Summary: Returns the declaration of the parent (non-synthetic or static) value. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12092 llvm-svn: 245319
* Remove Unicode byte-order mark from python files.Zachary Turner2015-08-135-5/+5
| | | | | | | | | This was caused by a bug in the PTVS source file editor, which has since been fixed and awaiting a new release. For now people using this editor need to remember to manually remove this before committing a file. llvm-svn: 244963
* XFAIL Watchpoint tests on Windows.Zachary Turner2015-08-135-5/+10
| | | | | | https://llvm.org/pr24446 tracks getting these tests re-enabled. llvm-svn: 244950
* XFAIL test_with_dwarf_formatters_api on FreeBSDEd Maste2015-07-271-0/+1
| | | | | | llvm.org/pr24282 llvm-svn: 243309
* Add option eTypeOptionHideEmptyAggregates.Siva Chandra2015-07-243-2/+53
| | | | | | | | | | | | | | | | | | Summary: For certain data structures, when the synthetic child provider returns zero children, a summary like "Empty instance of <typename>" could be more appropriate than something like "size=0 {}". This new option helps hide the trailing "{}". This is also exposed with a -h option for the command "type summary add". Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11473 llvm-svn: 243166
* XFAIL watchpoint tests on Android arm/aarch64Tamas Berghammer2015-07-226-0/+7
| | | | | | Differential revision: http://reviews.llvm.org/D11409 llvm-svn: 242887
* Fix typos.Bruce Mitchener2015-07-221-1/+1
| | | | | | | | | | | | Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
* Add a class ValueObjectConstResultCast.Siva Chandra2015-07-162-0/+16
| | | | | | | | | | | | | | | | | | | | | Summary: Other changes around the main change include: 1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl and ValueObjectConstResultChild. 2. Add an argument |live_address| of type lldb::addr_t to the constructor of ValueObjectConstResultChild. This is passed on to the backing ValueObjectConstResultImpl object constructor so that the address of the child value can be calculated properly. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11203 llvm-svn: 242374
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-015-6/+6
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [Python] Allow PyLong values in integer lists (when converting to C lists)Siva Chandra2015-07-011-18/+44
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestSBData Reviewers: clayborg, granata.enrico Reviewed By: clayborg, granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10821 llvm-svn: 241208
* Add test for SBValue.GetNonSyntheticValue in presence of synth provider.Siva Chandra2015-06-264-25/+80
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestFormattersSBAPI Reviewers: granata.enrico Reviewed By: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10783 llvm-svn: 240861
* Added expectedFlakey test decoratorVince Harron2015-06-261-1/+1
| | | | | | | | | | | | | | | | | 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
* Update TestPrintStackTraces XFAIL once morePavel Labath2015-06-251-1/+1
| | | | | | | it seems the failure happens also with clang. The main thing which triggers the failure is architecture. llvm-svn: 240652
* Fix TestThreadAPI on LinuxTamas Berghammer2015-06-251-6/+4
| | | | | | | On Linux malloc calls itself in some case. Change the test case to handle this scenario. llvm-svn: 240651
* Make XFAIL on TestPrintStackTraces more specificPavel Labath2015-06-251-4/+1
| | | | | | the thread creation failure was fixed, but a backtracing problem remains in some situations. llvm-svn: 240635
* Fix a variety of typos.Bruce Mitchener2015-06-181-2/+2
| | | | | | No functional change. llvm-svn: 239995
* Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.Chaoren Lin2015-06-061-1/+1
| | | | | | | | | | | | | | 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
* Un-enable TestEvents test on linuxPavel Labath2015-06-021-0/+2
| | | | | | Test still seems to fail about 1/10 runs. Skipping the test, but it a more greppable fashion. llvm-svn: 238826
* Enable TestEvents test on linuxPavel Labath2015-06-021-1/+0
| | | | | | | This test was very inconspicuosly skipped on linux, when it was crashing for local debugging. It seems to work fine with LLGS, so I'm enabling it. llvm-svn: 238816
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-275-6/+6
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* [TestChangeValueAPI] Remove expectedFailureGcc decorator.Siva Chandra2015-05-211-1/+0
| | | | | | | | | | | | | | Test Plan: dotest.py -C <clang|gcc> -p TestChangeValueAPI Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9116 llvm-svn: 237927
* Add bug number for TestEventsTamas Berghammer2015-05-211-1/+1
| | | | llvm-svn: 237904
* XFAIL TestEvents on Linux bacuse it is flakyTamas Berghammer2015-05-211-0/+1
| | | | llvm-svn: 237888
* Added minor commentVince Harron2015-05-121-0/+1
| | | | llvm-svn: 237174
OpenPOWER on IntegriCloud