summaryrefslogtreecommitdiffstats
path: root/lldb/test/macosx/universal/TestUniversal.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-107/+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/+3
| | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-2/+2
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Check before using platform specific attributes.Chaoren Lin2015-06-051-2/+4
| | | | | | | | | | | | Summary: `os.uname` in TestUniversal and `os.geteuid` in TestTerminal. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10202 llvm-svn: 239135
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | | | 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
* 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
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-8/+3
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* <rdar://problem/11358639>Greg Clayton2012-05-081-1/+1
| | | | | | | | Switch over to the "*-apple-macosx" for desktop and "*-apple-ios" for iOS triples. Also make the selection process for auto selecting platforms based off of an arch much better. llvm-svn: 156354
* Add a simple test case to exercise the ↵Johnny Chen2011-08-131-0/+19
| | | | | | SBDebugger.CreateTargetWithFileAndTargetTriple() API. llvm-svn: 137544
* Modify the skipUnless() logic to work for OSX Lion.Johnny Chen2011-08-131-1/+1
| | | | llvm-svn: 137542
* Now that we have added a post-processing step for adding truth value testing toJohnny Chen2011-05-241-2/+2
| | | | | | | those lldb objects which implement the IsValid() method, let's change the rest of the test suite to use the more compact truth value testing pattern (the Python way). llvm-svn: 131970
* Add test scenario to verify 'eax' register is available when launching the ↵Johnny Chen2011-05-081-0/+11
| | | | | | | | | | i386 slice of a universal binary and 'rax' register is available when launching the x86_64 slice. rdar://problem/9403437 llvm-svn: 131069
* Add new radar info for failed test.Johnny Chen2011-02-081-1/+1
| | | | llvm-svn: 125100
* Make the assertion message about 32-bit process address byte size more clear.Johnny Chen2011-02-081-2/+5
| | | | llvm-svn: 125099
* Remove @expectedFailure decorator as the bug has been fixed.Johnny Chen2010-12-011-1/+0
| | | | llvm-svn: 120624
* Add @expectedFailure decorator for a known bug:Johnny Chen2010-12-011-0/+2
| | | | | | rdar://problem/8689814 test failure: test/macosx/universal (the i386 slice does not break?) llvm-svn: 120505
* Make the specification of relative directory more robust.Johnny Chen2010-11-091-1/+1
| | | | llvm-svn: 118511
* Make calling the super class's setUp() method less fragile.Johnny Chen2010-10-141-1/+2
| | | | llvm-svn: 116490
* Avoid using hardcoded line number to break on. Use the line_number() utilityJohnny Chen2010-10-121-4/+13
| | | | | | function to get the line number to break on during setUp(). llvm-svn: 116356
* Marked test_process_launch_for_universal() test case as requiring 'darwin' ↵Johnny Chen2010-09-031-0/+5
| | | | | | | | and 'i386' in order to be run. And added a default build phase at the beginning of the method. llvm-svn: 113037
* Changed the test case class names to be noun-like instead of verb-like.Johnny Chen2010-09-011-1/+1
| | | | llvm-svn: 112732
* Added a test case test_breakpoint_creation_by_filespec_python() which creates aJohnny Chen2010-08-271-2/+2
| | | | | | | | breakpoint by FileSpec and line number and exercises some FileSpec APIs. Also, RUN_STOPPED is a bad assert name, RUN_SUCCEEDED is better. llvm-svn: 112327
* Changed from dbg.GetCurrentTarget() to dbg.GetSelectedTarget().Johnny Chen2010-08-261-2/+2
| | | | llvm-svn: 112231
* Added logic to TestUniversal.py to exercise the python APIs:Johnny Chen2010-08-251-0/+16
| | | | | | | | | | | | | | o SBDebugger.GetCurrentTarget() o SBTarget.GetProcess() o SBProcess.GetAddressByteSize() in order to make sure that, indeed, 64-bit, followed by 32-bit processes have been launched. Added invoke() method to TestBase to factor in the tracing logic in one place. This method allows an object to call a method with no arg reflectively. llvm-svn: 112102
* Removed the @unitest2.expectedFailure decorator. The i386 process launch worksJohnny Chen2010-08-241-4/+1
| | | | | | | correctly after all. It was my own configuration error (I was building x86_64 only). llvm-svn: 111992
* Added a test for launching a universal binary. Launch of i386 architectureJohnny Chen2010-08-241-0/+52
currently fails: rdar://problem/8349784. Forgot to check in lldbtest.py in the previous commit r111958. llvm-svn: 111975
OpenPOWER on IntegriCloud