summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/objc/foundation/TestObjCMethods.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-262/+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
* Port the python api decorator to use test categoriesPavel Labath2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | 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-231-2/+4
| | | | | | | | | | | | | 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-221-8/+2
| | | | | | | | | | | | | | | | | | | | | 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
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-102/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Rename clang_type -> compiler_type for variables.Bruce Mitchener2015-09-241-2/+2
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13102 llvm-svn: 248461
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-3/+3
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-3/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-1/+1
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* TestObjCMethods.FoundationTestCase was failing due to an error, fixed now.Greg Clayton2014-07-161-13/+16
| | | | | | | <rdar://problem/16322133> llvm.org/pr20267 llvm-svn: 213111
* Marked TestObjCMethods failing tests XFAIL, fixed cleanup code, removed ↵Todd Fiala2014-07-091-2/+4
| | | | | | | | | | | | now-passing expected failure markers. All tests matching '-p TestObjCMethods' now are marked correctly for MacOSX, and some error classes have been removed in cleanup code looking for files that might not exist due to previous failure. See http://llvm.org/bugs/show_bug.cgi?id=20267 llvm-svn: 212650
* Fixed a test suite failure on Darwin due to logging issues.Greg Clayton2014-02-131-1/+1
| | | | llvm-svn: 201356
* Removed spurious lookup of the $__lldb_exprSean Callanan2014-02-061-2/+0
| | | | | | | | | selector when compiling an expression in an Objective-C context. <rdar://problem/15797390> llvm-svn: 200950
* Fixed a test suite exception that was cause by bad python (sys.unlink ↵Greg Clayton2014-01-231-1/+1
| | | | | | instead of os.unlink). llvm-svn: 199952
* Make sure to cleanup the "dwarf-lookups.txt" log file.Greg Clayton2014-01-111-1/+7
| | | | llvm-svn: 198984
* We are doing spurious name lookups when running expressions in objective C ↵Greg Clayton2014-01-111-0/+42
| | | | | | | | | | methods. <rdar://problem/15797390> This new test case will detect this and make sure we don't regress on global name lookups that search all DWARF for everything when we don't need to. llvm-svn: 198982
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-131-1/+1
| | | | | | and remote targets. llvm-svn: 197266
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-1/+1
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* <rdar://problem/12953853>Greg Clayton2013-01-081-1/+1
| | | | | | | | | | Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file. Also fixed issues in the test suite that arose after fixing the bug. Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option. llvm-svn: 171816
* Option changes:Enrico Granata2012-12-121-1/+1
| | | | | | | | | | | | | | | | | the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command. All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o) This is a breaking change: frame variable used --objc as the long option name expression used -o as a shortcut memory read uses --objd as the long option name Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works The test suite has been tweaked accordingly. llvm-svn: 169961
* <rdar://problem/12798131> Greg Clayton2012-12-041-4/+4
| | | | | | | | | | | | Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite. This fix does the following: - make sure all short options are treated as "int" - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value llvm-svn: 169189
* Missed a few places where I didn't delete the obsolete (commented out) ↵Jim Ingham2012-09-221-12/+1
| | | | | | version of the breakpoint creation. llvm-svn: 164436
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-14/+23
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.Johnny Chen2012-04-061-0/+6
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Fixed a problem in our local Clang's method forSean Callanan2012-01-051-0/+4
| | | | | | | | | | | | performing Objective-C instance variable lookup. Previously, it only completed the derived class that was the beginning of the search. Now, as it walks up the superclass chain looking for the ivar, it completes each superclass in turn. Also added a testcase covering this issue. llvm-svn: 147621
* Cleaned up the SBType.h file to not include internal headers and reorganizedGreg Clayton2011-08-031-2/+2
| | | | | | | | | | | | | | | | | | the SBType implementation classes. Fixed LLDB core and the test suite to not use deprecated SBValue APIs. Added a few new APIs to SBValue: int64_t SBValue::GetValueAsSigned(int64_t fail_value=0); uint64_t SBValue::GetValueAsUnsigned(uint64_t fail_value=0) llvm-svn: 136829
* Passing in os.ctermid() as the arg for SBTarget.Launch(...) for stdin_path, ↵Johnny Chen2011-07-111-2/+1
| | | | | | | | | | | | stdout_path, and stderr_path is just wrong and resulted in the inferior's output getting mixed into the GDB remote communication's log file. Change all test cases to not pass os.ctermid() and either use SBTarget.LaunchSimple() or SBTarget.Launch() and pass None as stdin_path/stdout_path/srderr_path to use a pseudo terminal. rdar://problem/9716499 program output is getting mixed into the GDB remote communications llvm-svn: 134940
* Centralize all of the type name code so that we always strip the leadingGreg Clayton2011-06-301-1/+1
| | | | | | | | "struct ", "class ", and "union " from the start of any type names that are extracted from clang QualType objects. I had to fix test suite cases that were expecting the struct/union/class prefix to be there. llvm-svn: 134132
* Add @expectedFailure for TestCallStdStringFunction.py (radar was filed) andJohnny Chen2011-06-281-1/+0
| | | | | | | remove @expectedFailure from TestObjCMethods.py's print_ivars_correctly() function (it has been passing for a while). llvm-svn: 134022
* Move global_variables dir to lang/c and foundation dir to lang/objc.Johnny Chen2011-06-251-0/+255
llvm-svn: 133883
OpenPOWER on IntegriCloud