summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang
Commit message (Collapse)AuthorAgeFilesLines
* Move go expression tests to the new location.Ryan Brown2015-11-022-134/+0
| | | | llvm-svn: 251835
* Create an expression parser for Go.Ryan Brown2015-11-022-0/+134
| | | | | | | | | | | The Go interpreter doesn't JIT or use LLVM, so this also moves all the JIT related code from UserExpression to a new class LLVMUserExpression. Differential Revision: http://reviews.llvm.org/D13073 Fix merge llvm-svn: 251820
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-28335-13216/+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-2778-78/+78
| | | | llvm-svn: 251444
* Convert `long` to `int`, and portably detect all integral types.Zachary Turner2015-10-261-1/+1
| | | | llvm-svn: 251305
* Fix usages of range() and xrange() for Python 3.Zachary Turner2015-10-262-2/+2
| | | | llvm-svn: 251302
* Port the python api decorator to use test categoriesPavel Labath2015-10-2629-30/+30
| | | | | | | | | | | | | | | | | | 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-2379-41/+199
| | | | | | | | | | | | | 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-2292-657/+171
| | | | | | | | | | | | | | | | | | | | | 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
* Fix test for change in a summary string (objects -> elements).Jim Ingham2015-10-121-6/+6
| | | | llvm-svn: 250081
* Rename one of the TestGoASTContextsPavel Labath2015-10-091-0/+0
| | | | llvm-svn: 249823
* Testcase and fix for bug 24074Ravitheja Addepally2015-10-083-0/+96
| | | | | | | | | | | | | | | | | | | | Summary: In bug 24074, the type information is not shown correctly. This commit includes the following - -> Changes for displaying correct type based on current lexical scope for the command "image lookup -t" -> The corresponding testcase. -> This patch was reverted due to segfaults in FreeBSD and Mac, I fixed the problems for both now. Reviewers: emaste, granata.enrico, jingham, clayborg Differential Revision: http://reviews.llvm.org/D13290 llvm-svn: 249673
* [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
* Another stripped test that requires darwin and a dSYM (no Dwarf or DWO).Greg Clayton2015-10-071-0/+2
| | | | llvm-svn: 249605
* More fixes for binaries that we strip. When we strip a binary we can't do ↵Greg Clayton2015-10-071-0/+4
| | | | | | Dwarf or DWO. llvm-svn: 249604
* Fix a test that should only be run with a dSYM file by adding @skipIfDwarf ↵Greg Clayton2015-10-071-0/+2
| | | | | | and using a new @skipIfDWO. llvm-svn: 249601
* Add expectedFailureFreeBSD for Go runtime testEd Maste2015-10-071-0/+1
| | | | | | | | AssertionError: False is not True : No thread stopped at our breakpoint. llvm.org/pr24895 llvm-svn: 249561
* Add missing GoLanguageRuntime files.Ryan Brown2015-10-062-0/+117
| | | | llvm-svn: 249459
* 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-3092-2328/+719
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Revert 248366 "Testcase and fix for bug 24074"Enrico Granata2015-09-233-96/+0
| | | | | | This commit introduced regressions in several test cases on FreeBSD and Mac OS X llvm-svn: 248421
* [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
* Testcase and fix for bug 24074Ravitheja Addepally2015-09-233-0/+96
| | | | | | | | | | | | | | | | Summary: In bug 24074, the type information is not shown correctly. This commit includes the following - -> Changes for displaying correct type based on current lexical scope for the command "image lookup -t" -> The corresponding testcase. Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg Differential Revision: http://reviews.llvm.org/D12404 llvm-svn: 248366
* Fix a test case which was failing. There was no actual problem in the test ↵Enrico Granata2015-09-221-1/+1
| | | | | | logic, just a cosmetic issue with the presentation of the result by Foundation llvm-svn: 248339
* Remove expectedFailureFreeBSD from passing test_expr_null_with_dwarfEd Maste2015-09-221-1/+0
| | | | | | llvm.org/pr21550 llvm-svn: 248236
* For now skip go tests that trigger assertion failures on FreeBSDEd Maste2015-09-212-0/+2
| | | | | | llvm.org/pr24895 llvm-svn: 248155
* 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 an OperatingSystem plugin to support goroutinesRyan Brown2015-09-162-0/+176
| | | | | | | | | | The Go runtime schedules user level threads (goroutines) across real threads. This adds an OS plugin to create memory threads for goroutines. It supports the 1.4 and 1.5 go runtime. Differential Revision: http://reviews.llvm.org/D5871 llvm-svn: 247852
* 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
* Last set of XFAILs for Windows.Zachary Turner2015-09-161-0/+2
| | | | llvm-svn: 247825
* 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
* Skip TestGoASTContext on remote targets as it it not remote compatibleTamas Berghammer2015-09-151-0/+1
| | | | llvm-svn: 247690
* Add support for DW_OP_GNU_const_index to dwarf expressionTamas Berghammer2015-09-151-1/+1
| | | | | | | | DW_OP_GNU_const_index is a new opcode used when split dwarf is enabled Differential revision: http://reviews.llvm.org/D12849 llvm-svn: 247672
* Fixed up TestConstVariables for Linux/FreeBSD, take 2.Todd Fiala2015-09-151-1/+9
| | | | | | | | | | | Marked XFAIL for: clang - all versions < 3.5. I verified the first version it passes on Linux is 3.5. clang - version 3.7 (verified this fails) clang - TOT/3.8 (verified this currently fails) Ideally we dig into why this started failing and (hopefully) get this passing again. llvm-svn: 247664
* Revert "Fixup XFAIL marking on TestConstVariables for clang version"Chaoren Lin2015-09-151-3/+1
| | | | | | | | | | | | | | | Summary: Linux with ToT clang (3.8) fails. This reverts commit r247633. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12868 llvm-svn: 247648
* Fixup XFAIL marking on TestConstVariables for clang versionTodd Fiala2015-09-141-1/+3
| | | | | | | | | | Linux/clang on clang 3.6+ is passing this test. As OS X was in a similar position, I'm guessing this was fixed by a recent compiler. Might work on 3.5/3.4, but it is definitely working on clang 3.6. I didn't break out FreeBSD since this appears to be related to a compiler fix. llvm-svn: 247633
* Add a TypeSystem for GoRyan Brown2015-09-142-0/+181
| | | | | | | | Add GoASTContext and DWARFASTParserGo to support go. Differential Revision: http://reviews.llvm.org/D12585 llvm-svn: 247629
* Another round of macosx unexpected success corrections.Todd Fiala2015-09-142-2/+2
| | | | llvm-svn: 247602
* OS X unexpected success cleanupTodd Fiala2015-09-141-2/+4
| | | | | | | | | | TestPersistObjCPointeeType and TestObjCNewSyntax marked up to expect success on clang >= 7.0.0. TestMultipleDebuggers passed 25/25 times, taking off intermittent. If this changes, I'll make sure it goes into a flaky/flakey category. llvm-svn: 247601
* Correct XFAIL OS list after r247576Ed Maste2015-09-141-2/+2
| | | | | | | In ConstVariableTestCase::test_with_dwarf_and_run_command - the test fails with Clang (and presumably ICC) also on FreeBSD. llvm-svn: 247594
OpenPOWER on IntegriCloud