summaryrefslogtreecommitdiffstats
path: root/lldb/test/lang/c/anonymous/TestAnonymous.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-147/+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
* 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-7/+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-103/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 test_expr_null_with_dwarfEd Maste2015-09-221-1/+0
| | | | | | llvm.org/pr21550 llvm-svn: 248236
* XFAIL TestAnonymous.test_expr_null_with_dwarf on Windows.Zachary Turner2015-08-201-0/+1
| | | | | | | This bug is tracked in llvm.org/pr21550, and also reproduces on FreeBSD apparently. llvm-svn: 245627
* [TestAnonymous] Enable all tests for GCCSiva Chandra2015-04-101-8/+5
| | | | | | | | | | | | | | | | | | Summary: Also added "_with_dsym" prefix to the dsym tests, and "_with_dwarf" to the dwarf tests. Test Plan: dotest.py -C gcc -p TestAnonymous Reviewers: chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8944 llvm-svn: 234624
* Fixes for remote test suite execution of the "lldb/test/lang" directory.Greg Clayton2014-11-171-7/+21
| | | | | | | | | Fixes include: - Add a new lldbtest.TestBase function named registerSharedLibrariesWithTarget. This function can be called using the shared libraries for your test suite either as shared library basename ("foo"), path basename ("libfoo.dylib") or full path ("/tmp/lldb/test/lang/c/carp/libfoo.dylib"). These shared libraries are then registered with the target so they will be downloaded when the test is run remotely. - Changed a lot of tests over to use SBDebugger::CreateTarget(...) calls instead of using "file a.out" commands. - Cleaned up some tests to add new locations for breakpoints that all compilers should be able to abide by. Some tests and constants being loaded into values of structs and some compilers like arm64 will often combine two constant data loads into a single source line so some breakpoint locations were not being set correctly. Adding lines like 'puts("")' allow us to lock onto a source line that will have code. llvm-svn: 222156
* Add decorator for failing null dereference test on FreeBSDEd Maste2014-11-121-0/+1
| | | | | | llvm.org/pr21550 llvm-svn: 221815
* This test actually works alright - we were just checking for the wrong stringEnrico Granata2014-10-161-4/+1
| | | | llvm-svn: 219971
* 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
* Fixing TestAnonymous to build dwarf where it says it will.Andrew Kaylor2013-10-291-1/+1
| | | | llvm-svn: 193628
* ValueObject and SBValue's GetChildMemberWithName should look through ↵Jim Ingham2013-10-181-0/+43
| | | | | | | | | | anonymous structs and unions the same way that C would. <rdar://problem/11987906> llvm-svn: 193016
* <rdar://problem/12042982>Enrico Granata2013-10-041-5/+2
| | | | | | | | | | | | | | | | | | | This radar extends the notion of one-liner summaries to automagically apply in a few interesting cases More specifically, this checkin changes the printout of ValueObjects to print on one-line (as if type summary add -c had been applied) iff: this ValueObject does not have a summary its children have no synthetic children its children are not a non-empty base class without a summary its children do not have a summary that asks for children to show up the aggregate length of all the names of all the children is <= 50 characters you did not ask to see the types during a printout your pointer depth is 0 This is meant to simplify the way LLDB shows data on screen for small structs and similarly compact data types (e.g. std::pair<int,int> anyone?) Feedback is especially welcome on how the feature feels and corner cases where we should apply this printout and don't (or viceversa, we are applying it when we shouldn't be) llvm-svn: 191996
* If using clang 3.4, skip tests affected by llvm.org/pr16214Daniel Malea2013-06-121-0/+2
| | | | | | - clang emits incomplete DWARF information for structures referenced via typedef llvm-svn: 183846
* Skipping a test that asserts with gcc and icc to allow the test suite to run ↵Ashok Thirumurthi2013-05-091-2/+2
| | | | | | to completion on the gcc buildbot. llvm-svn: 181512
* Fixed the anonymous testcase. It was testingSean Callanan2013-04-271-3/+3
| | | | | | access to 'z' where 'z' was not in scope. llvm-svn: 180662
* Improved tests for nested structs when anonymous structs are involved.Ashok Thirumurthi2013-04-191-14/+104
| | | | | | | | | | | | - New tests can fail on OS/X and Linux, and illustrate that the compiler used to generate the DWARF can result in lldb providing clang with an external AST source that doesn't describe all required struct fields. - Also includes test coverage for expressions with structs that do work on Linux- Also includes a test for dereferencing a null pointer to a struct, which works on OS/X rather than complaining, and complains on Linux with an upstream error that is really a side issue. Thanks to Samuel, Andy and Daniel for their input. llvm-svn: 179884
* Add icc support to the test suiteMatt Kopec2013-03-151-0/+1
| | | | | | | | | | -adds icc to the lit of compilers to run the tests -adds icc test decorators -skip TestAnonymous.py for icc Patch by Ashok Thirumurthi. llvm-svn: 177174
* Un-skipping tests affected by llvm.org/pr15256Daniel Malea2013-03-041-1/+1
| | | | | | patch by Ashok Thirumurthi! llvm-svn: 176462
* Skip tests that assert on Linux in ↵Daniel Malea2013-02-131-1/+1
| | | | | | | | RecordLayoutBuilder::updateExternalFieldOffset() - Filed bugzilla PR-15256 llvm-svn: 175065
* Mark test cases affected by PR 15036 (GCC-generated DWARF causes parser crash)Daniel Malea2013-01-241-0/+1
| | | | | | - Add new decorator "@skipIfGcc" to lldbtest.py llvm-svn: 173394
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-2/+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/+2
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Improved the type's handling of anonymous structs,Sean Callanan2012-03-021-0/+59
so that the expression parser can look up members of anonymous structs correctly. This meant creating all the proper IndirectFieldDecls in each Record after it has been completely populated with members. llvm-svn: 151868
OpenPOWER on IntegriCloud