summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-28106-4295/+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-2718-18/+18
| | | | llvm-svn: 251444
* Port the python api decorator to use test categoriesPavel Labath2015-10-266-7/+7
| | | | | | | | | | | | | | | | | | 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-2319-17/+55
| | | | | | | | | | | | | 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-2230-210/+42
| | | | | | | | | | | | | | | | | | | | | 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
* Clean up more .dwo files after the tests runPavel Labath2015-10-211-1/+1
| | | | llvm-svn: 250896
* [DWARFASTParserClang] Strengthen incomplete type handling.Siva Chandra2015-10-077-0/+97
| | | | | | | | | | | | Summary: This change fixes pr24916. As associated test has been added. Reviewers: clayborg Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D13224 llvm-svn: 249629
* Updated xfail / skip status on a few tests.Zachary Turner2015-10-024-2/+2
| | | | | | | | | | TestDiamond and TestSBValueCast were due to a bug in clang. That bug has been fixed, so xfail is removed. However fixing that bug exposed another bug in clang, which is not yet fixed. That bug causes one test to start crashing, and another to fail unexpectedly so the status of those tests is updated as well. llvm-svn: 249208
* Merge dwarf and dsym testsTamas Berghammer2015-09-3031-787/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix evaluation of unicode character arrays (char16_t[] and char32_t[])Dawn Perchik2015-09-252-3/+33
| | | | | | | | | | | | | | | | Suppose we have the UTF-16 string: char16_t[] s = u"hello"; Before this patch, evaluating the string in lldb would get: (char16_t [6]) $0 = ([0] = U+0068 u'h', [1] = U+0065 u'e', [2] = U+006c u'l', [3] = U+006c u'l', [4] = U+006f u'o', [5] = U+0000 u'\0') After applying the patch, we now get: (char16_t [6]) $0 = u"hello" Patch from evgeny.leviant@gmail.com Reviewed by: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13053 llvm-svn: 248555
* [TestCppIncompleteTypes] Handle different archs when building a.o.Siva Chandra2015-09-241-1/+1
| | | | | | | | | | Reviewers: chying Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13147 llvm-svn: 248547
* [TestCppIncompleteTypes] Remove the dependence on std::string.Siva Chandra2015-09-247-26/+45
| | | | | | | | | | Reviewers: dblaikie, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13143 llvm-svn: 248541
* [TestCppIncompleteTypes] Fix Makefile to handle different archs.Siva Chandra2015-09-231-4/+4
| | | | | | | | | | Reviewers: chying Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13111 llvm-svn: 248416
* Remove expectedFailureFreeBSD from passing testEd Maste2015-09-231-1/+0
| | | | | | | | ClassTypesTestCase::test_with_dwarf_and_constructor_name llvm.org/pr14540 llvm-svn: 248411
* DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or childSiva Chandra2015-09-235-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this change DWARFASTParserClang::CompleteTypeFromDWARF returns false if DWARFASTParserClang::ParseChildMembers returns false. Similarly, it returns false if any base class is of an incomplete type. This helps in cases like these: class Foo { public: std::string str; }; ... Foo f; If a file with the above code is compiled with a modern clang but without the -fno-limit-debug-info (or similar) option, then the DWARF has only a forward declration for std::string. In which case, the type for "class Foo" cannot be completed. If LLDB does not detect that a child member has incomplete type, then it wrongly conveys to clang (the LLDB compiler) that "class Foo" is complete, and consequently crashes due to an assertion failure in clang when running commands like "p f" or "frame var f". Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13066 llvm-svn: 248401
* XFAIL TestCppNsImport for gcc-4.9 inclusive.Chaoren Lin2015-09-161-1/+1
| | | | llvm-svn: 247863
* XFAIL TestCppNsImport for gcc-4.9.Chaoren Lin2015-09-161-0/+1
| | | | | | Works for gcc-4.8. A bug in gcc perhaps. llvm-svn: 247855
* Add using directives to the clang::DeclContext and fix decls for variables ↵Paul Herman2015-09-161-6/+9
| | | | | | | | | | | | | | inside namespaces Summary: Supports the parsing of the "using namespace XXX" and "using XXX::XXX" directives. Added ambiguity errors when it two decls with the same name are encountered (see comments in TestCppNsImport). Fixes using directives being duplicated for anonymous namespaces. Fixes GetDeclForUID for specification DIEs. Reviewers: sivachandra, chaoren, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12897 llvm-svn: 247836
* Remove XFAIL from TestCppNsImport.Zachary Turner2015-09-161-2/+0
| | | | | | This test seems to be working now, probably due to r244764. llvm-svn: 247830
* Fix MacOSX since "imported" and "Imported::imported" are ambiguous. Test ↵Greg Clayton2015-09-161-2/+9
| | | | | | that we can read the global when specified with the global namespace and test that we can read "Imported::imported" correctly. The commented out test should be testing for ambiguity when just "imported" is evaluated as an expression, but that doesn't work yet. llvm-svn: 247764
* Search variables based on clang::DeclContext and clang::Decl treePaul Herman2015-09-152-3/+80
| | | | | | | | | | | | Summary: SymbolFileDWARF now creates VarDecl and BlockDecl and adds them to the Decl tree. Then, in ClangExpressionDeclMap it uses the Decl tree to search for a variable. This fixes lots of variable scoping problems. Reviewers: sivachandra, chaoren, spyffe, clayborg Subscribers: tberghammer, jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D12658 llvm-svn: 247746
* Another round of macosx unexpected success corrections.Todd Fiala2015-09-141-1/+0
| | | | llvm-svn: 247602
* Cleaned up a few unexpected successes on OS XTodd Fiala2015-09-141-2/+0
| | | | | | | | | TestCallStdStringFunction TestCallWithTimeout TestConstVariables TestClassTypes llvm-svn: 247576
* XFAIL tests that try to call a function in the inferior.Zachary Turner2015-09-112-0/+2
| | | | | | llvm.org/pr21765 llvm-svn: 247456
* XFAIL some C++ language specific tests on Windows.Zachary Turner2015-09-115-0/+5
| | | | | | http://llvm.org/pr24764 llvm-svn: 247455
* Don't allow duplicate names for tests.Zachary Turner2015-09-093-1/+1
| | | | | | | | | We had 2 tests named TestCPPBreakpoints.py. If one of those tests failed, both of them would be reported as failures and contribute to the failure count. There may be other examples of duplicate test names, and we should fix those as we find them. llvm-svn: 247173
* [Windows] XFAIL test that depend on dynamic value types.Zachary Turner2015-09-021-0/+1
| | | | llvm-svn: 246669
* XFAIL the last Windows test that calls a function in the target.Zachary Turner2015-08-211-0/+1
| | | | llvm-svn: 245749
* XFAIL Tests that require C++ exceptions on Windows.Zachary Turner2015-08-211-0/+1
| | | | | | | | | clang-cl does not yet support C++ exceptions, so these tests will not even compile. Re-enabling these tests is tracked by llvm.org/pr24538 llvm-svn: 245747
* [Windows] XFAIL tests that require calling a function in target.Zachary Turner2015-08-201-0/+1
| | | | | | | This has known issues on Windows. Fixing this is tracked by http://llvm.org/pr21765 llvm-svn: 245630
* Fix tests to work on remote targets.Paul Herman2015-08-193-6/+6
| | | | llvm-svn: 245515
* Fix evaluation of global operators in C++Paul Herman2015-08-193-0/+93
| | | | llvm-svn: 245508
* Improve tests regarding imported namespaces and chained calls in C++Paul Herman2015-08-194-232/+87
| | | | llvm-svn: 245505
* XFAIL TestCppScope for Darwin.Chaoren Lin2015-08-191-0/+2
| | | | llvm-svn: 245418
* Fix TestCppNsImport and TestCppScope for remote tests.Chaoren Lin2015-08-192-18/+18
| | | | llvm-svn: 245412
* XFAIL TestCppChainedCalls for GCC.Chaoren Lin2015-08-191-0/+1
| | | | llvm-svn: 245407
* Fix resolution conflict between global and class static variables in C++Paul Herman2015-08-183-0/+113
| | | | llvm-svn: 245381
* Test chaned function calls and imported namespaces in C++Paul Herman2015-08-186-0/+385
| | | | llvm-svn: 245380
* [Windows] XFAIL tests that depend on expression name lookup.Zachary Turner2015-08-186-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Name lookup doesn't work properly with Windows targets. This is most likely due to issues with name mangling, although there is at least one set of debug info related issues as well, since some of the name lookup requests appear to be failing on types rather than symbols. Specifically, this patch XFAILS the following set of tests: TestChar1632T.py TestRdar12991846.py TestConstVariables.py TestCallCPPFunction.py TestCallStopAndContinue.py TestCallUserDefinedFunction.py TestCModules.py TestCPPThis.py TestExprs2.py TestOverloadedFunctions.py TestRvalueReferences.py And fixing the underlying issue is tracked in http://llvm.org/pr24489 llvm-svn: 245338
* Teach the "extend char types" (char16_t, char32_t and wchar_t) formatters ↵Enrico Granata2015-07-174-0/+12
| | | | | | that a *single character* whose value is 0 is actually a valid thing to print out llvm-svn: 242572
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-0116-17/+17
| | | | | | with all the other assertion messages. llvm-svn: 241212
* 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
* Fix compile error in TestCxxWCharT on LinuxTamas Berghammer2015-06-161-0/+2
| | | | llvm-svn: 239830
* Add a formatter for wchar_t[N] arraysEnrico Granata2015-06-152-0/+5
| | | | | | rdar://21299888 llvm-svn: 239777
* [TestNamespace] Fix an accidentally committed local change.Siva Chandra2015-05-271-1/+1
| | | | | | | | | | | | Test Plan: dotest.py -p TestNamespace Reviewers: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10076 llvm-svn: 238368
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-2716-18/+18
| | | | | | | | | | | | | | | | | | | | | 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
* [TestRvalueReferences] Fix an expectation.Siva Chandra2015-04-151-3/+1
| | | | | | | | | | | | | | | | | | | | Summary: If 'i' is an rvalue reference to an 'int', evaluating it with the 'expression' command will return an 'int' value and not an 'int &&'. Before this patch, an 'int &&' type was expected. Enabled the test for clang and gcc as all parts of the test now pass when the testcase is compiled with them. Test Plan: dotest.py -C <gcc|clang> -p TestRvalueReferences Reviewers: spyffe, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9005 llvm-svn: 235036
* Enable a test in TestSTL for GCC.Siva Chandra2015-04-061-1/+1
| | | | | | | | | | | | | | | | Summary: Remove @skipIfGcc from a test in TestSTL as that test passes with GCC now. Also, mark one of the dsym tests with @skipUnlessDarwin in TestSTL. Test Plan: dotest.py -C gcc -p TestSTL Reviewers: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8793 llvm-svn: 234243
* Many many test failures after some recent changes. The problem is ↵Greg Clayton2015-04-022-2/+2
| | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud