summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/cpp/class_static
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-283-178/+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-0/+2
| | | | | | | | | | | | | 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-39/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* XFAIL some C++ language specific tests on Windows.Zachary Turner2015-09-111-0/+1
| | | | | | http://llvm.org/pr24764 llvm-svn: 247455
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-1/+1
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* XFAIL a test that fails on FreeBSD 11 (local and buildbot)Ed Maste2015-05-111-0/+1
| | | | | | | | | | | For some reason this happens only when running the full test suite (e.g., via ninja check-lldb), but not when running the TestStaticVariables.py tests in isolation. XFAIL for now while investigating, in an attempt to bring the bot to green and reduce noise. llvm.org/pr20550 llvm-svn: 236993
* Many many test failures after some recent changes. The problem is ↵Greg Clayton2015-04-021-1/+1
| | | | | | | | | | | | | | | | lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin". There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a: lldbtest.platformIsDarwin() which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function: lldbtest.getDarwinOSTriples() Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well. llvm-svn: 233933
* Update sys.platform switched behavior in tests to use self.getPlatform ↵Robert Flack2015-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | (remote target platform) Uses target platform when determining which platform specific behavior to use or expect in tests. TestHelp.py was unchanged because this is asserting behavior of the local lldb binary. Test Plan: Run tests on different remote os. Several previously failing tests now pass: TestArrayTypes.py TestInferiorChanged.py TestInferiorCrashing.py TestIvarProtocols.py TestProcessIO.py TestPublicAPIHeaders.py TestRecursiveInferior.py Differential Revision: http://reviews.llvm.org/D8747 llvm-svn: 233805
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-2/+2
| | | | | | | | | | | | | | | | 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
* Make array symbol reading resilient to incomplete DWARF.Siva Chandra2015-01-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GCC emits DW_TAG_subrange_type for static member arrays, but with no attributes. This in turn results in wrong type/value of the array when printing with 'target variable <array var name>'. This patch fixes this so that the array value is printed in this format: (<element type> []) <array var name> = {} Earlier, the array was being interpreted to be of its element type. Note: This does not fix anything to do with 'expr' or 'p' commands. Those commands still error out complaining about incomplete types. Test Plan: dotest.py -p TestStaticVariables Reviewers: emaste, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6799 llvm-svn: 225219
* [TestStaticVariables] Mark the one unmarked test let also expectedFailure.Siva Chandra2014-12-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test is question here is already annotated with @expectedFailureDarwin(9980907). This change also removes an uneccessary (and probably wrong) logic of byssing few asserts if the compiler is not clang or llvm-gcc. Both GCC and Clang emit incomplete debug info. Clang emits this: < 1><0x00000026> DW_TAG_class_type DW_AT_name "A" DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001b < 2><0x0000002e> DW_TAG_member DW_AT_name "g_points" DW_AT_type <0x0000003b> DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001e DW_AT_external yes(1) DW_AT_declaration yes(1) DW_AT_accessibility DW_ACCESS_public < 1><0x0000003b> DW_TAG_array_type DW_AT_type <0x00000046> < 2><0x00000040> DW_TAG_subrange_type DW_AT_type <0x0000007b> Notice that the DIE at 0x40 does not specify an upperbound. This is with Clang-3.5 and Clang ToT. GCC emits this: < 1><0x000000aa> DW_TAG_class_type DW_AT_name "A" DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001b DW_AT_sibling <0x000000c1> < 2><0x000000b4> DW_TAG_member DW_AT_name "g_points" DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001e DW_AT_type <0x000000c1> DW_AT_external yes(1) DW_AT_accessibility DW_ACCESS_public DW_AT_declaration yes(1) < 1><0x000000c1> DW_TAG_array_type DW_AT_type <0x0000007e> DW_AT_sibling <0x000000cc> < 2><0x000000ca> DW_TAG_subrange_type The DIE at 0xca is missing attributes. This is with gcc-4.8.2. Test Plan: dotest.py -C clang -P TestStaticVariables.py Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6713 llvm-svn: 224643
* Switch to Darwin decorator for tests that XPASS on FreeBSDEd Maste2014-04-221-1/+1
| | | | | | | | | | | Since these tests pass on (at least some) other platforms, change the decorators to @expectedFailureDwarwin. Tested on FreeBSD with Clang 3.4 and libc++. rdar://9980907 rdar://15367233 llvm-svn: 206895
* Add a comment to tests that XPASS on FreeBSDEd Maste2014-04-211-1/+1
| | | | | | | | | | | | | | Perhaps these should be @expectedFailureDarwin instead of @unittest2.expectedFailure (applying to all hosts); I'm not aware of the details in the rdars. Just add a comment for now, for the benefit of anyone investigating FreeBSD test issues in the future. rdar://9980907 rdar://15367233 llvm-svn: 206760
* 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
* test: Update FreeBSD failure decoratorsEd Maste2013-09-131-0/+1
| | | | | | | | | | | | | | | llvm.org/pr15261 missing size for static arrays llvm.org/pr15278 expressions generating signals llvm.org/pr15824 thread states aren't properly maintained llvm.org/pr16696 threaded inferior debugging not yet on FreeBSD llvm.org/pr17214 inline stepping fails on FreeBSD llvm.org/pr17225 Clang assertion failure llvm.org/pr17226 frame info lost after failed expression evaluation llvm.org/pr17228 test timeout The first three are existing Linux issues that also affect FreeBSD. llvm-svn: 190698
* Update failing tests on Linux for clang and gcc to only fail on Linux ↵Matt Kopec2013-08-011-2/+2
| | | | | | | | instead of all platforms. Thanks Stefanus! llvm-svn: 187585
* Mark some tests as explicitly failing on clang/gcc as they pass on icc.Matt Kopec2013-07-311-1/+2
| | | | | | Also, rework the signed types test to check for signed or char type in the output as char is signed by default. llvm-svn: 187533
* Fixed an xpass due to r181841 on Linux with gcc. Note that the clang ↵Ashok Thirumurthi2013-05-151-1/+0
| | | | | | variant contains to xfail, and r181841 is a fix for the test. llvm-svn: 181918
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-151-1/+1
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Unbreak the linux buildbot tests. This still fails for the clang that is ↵Greg Clayton2013-05-141-0/+2
| | | | | | being used on linux. llvm-svn: 181845
* Fixed the test case to pass on Darwin. This might pass on linux as well. The ↵Greg Clayton2013-05-141-3/+2
| | | | | | test case now properly validates g_points as a global for the class A version, and the static variable for the file static. llvm-svn: 181840
* Fixing issues in previous checkin - still figuring out how to make ↵Enrico Granata2013-02-231-6/+4
| | | | | | expectedFailureClang take the bugnumber llvm-svn: 175945
* A few more GCC specific test fixes as per logged PRs:Daniel Malea2013-02-191-0/+2
| | | | | | | | | - TestNamespace expected to fail due to PR-15302 - TestCPPBool and TestUnsignedTypes updated to handle GCC style debug information - TestRvalueReferences expected fail due to GCC (4.7) not outputting rvalue-reference debug information - TestDataFormatterStdVBool expected to fail due to PR-15301 llvm-svn: 175551
* Marking two tests expected-to-fail on LinuxDaniel Malea2013-02-141-0/+1
| | | | | | | - PR-15260: lldb does not display correct value of 1-bit field - PR-16261: lldb does not display size of (file/class) static array llvm-svn: 175111
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-4/+2
| | | | | | | | 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/+4
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Add some expected failure decorators with radar numbers.Johnny Chen2011-08-231-0/+4
| | | | llvm-svn: 138316
* Modify test cases to use 'target variable' to display global variables.Johnny Chen2011-08-221-9/+7
| | | | llvm-svn: 138247
* Cleaned up the SBType.h file to not include internal headers and reorganizedGreg Clayton2011-08-031-1/+1
| | | | | | | | | | | | | | | | | | 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
* The lldbtest.TestBase.DebugSBValue(self, val) method call now does not need ↵Johnny Chen2011-07-111-7/+7
| | | | | | | | the frame argument. Only the val (of SBValue type) argument is needed. llvm-svn: 134915
* Centralize the variable display prefs into a new optionGreg Clayton2011-07-071-2/+4
| | | | | | | | | | | | | group class: OptionGroupVariable. It gets initialized with a boolean that indicates if the frame specific options are included so that this can be used in both the "frame variable" and "target variable" commands. Removed the global functionality from the "frame variable" command. Users should switch to using the "target variable" command. llvm-svn: 134594
* Move some directories to now reside under lang/c or lang/cpp.Johnny Chen2011-06-253-0/+200
llvm-svn: 133881
OpenPOWER on IntegriCloud