summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbtest.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't set stdin to devnull for forked processesAndrew Kaylor2013-06-071-1/+0
| | | | llvm-svn: 183578
* Reworked the routine that qualifies the tool-chain for expected failures to ↵Ashok Thirumurthi2013-06-061-5/+15
| | | | | | | | | handle sub-strings. - For instance, allows 'gcc' to match x86-64-linux-gnu-gcc as required on some Debian builds. - Also adds doc-strings and a more consistent naming convention for related helpers. llvm-svn: 183415
* Add test cases for attaching to a process after forkDaniel Malea2013-06-051-0/+31
| | | | | | | | | - one test case is due to llvm.org/pr16229 - other test case uses a Linux workaround for above by using os.fork() instead of subprocess module Patch by Andy Kaylor! llvm-svn: 183340
* Adding support for stopping all threads of multithreaded inferiors on Linux. ↵Andrew Kaylor2013-05-281-0/+23
| | | | | | Also adding multithreaded test cases. llvm-svn: 182809
* Fix xpasses on the gcc buildbots using compiler versions to qualify the xfail.Ashok Thirumurthi2013-05-171-8/+34
| | | | | | | | | | - Note that this is not correct, as the failure is associated with build options of libc.so, however it's failing on a Debian buildbot that uses gcc 4.6.2 (and the real goal is a complete backtrace even with -fomit-frame-pointer). - Adds helpers to lldbtest.py to check the expectedCompiler and expectedVersion, with an eventual goal of reducing the number of test decorators. --- Currently allows a comparison operator and a compiler version to be specified. --- Can be extended to support ranges of compiler versions. llvm-svn: 182155
* Adds a test case for bugzilla #15671 patterned after TestInferiorCrashing.py.Ashok Thirumurthi2013-05-171-0/+2
| | | | | | | | | - On Linux, the partial back-trace after an assert can cause the basic test to fail as discussed on lldb-dev. - Uses SBFrame to walk up the stack to the assert site and tests expression evaluation of locals, globals and arguments. Thanks to Daniel for review and testing on OS/X. llvm-svn: 182115
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-151-2/+2
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Need to add the LLDB.framework directory to the rpath for the driver ↵Jim Ingham2013-05-151-1/+1
| | | | | | programs or they won't run. llvm-svn: 181857
* Skip C++ API/Multithreaded tests that are unsupported with Clang/libstdc++Daniel Malea2013-05-141-0/+18
| | | | | | | - older versions of clang are unable to include <chrono> from libstdc++ - skipping tests until buildbots are updated llvm-svn: 181829
* Add watchpoint support for Linux on 64-bit host.Matt Kopec2013-05-071-0/+36
| | | | llvm-svn: 181341
* Fix typo in C++11 flag for the GCC 4.6 code path: missing '-'Daniel Malea2013-05-061-1/+1
| | | | llvm-svn: 181239
* Fix check_public_api_headers test on mac os x, and refactor some logic into ↵Daniel Malea2013-05-021-0/+61
| | | | | | | | | lldbtest.py - moved build logic from Makefile and TestPublicAPIHeaders.py into lldbtest to allow reuse - added decorator @skipIfi386 llvm-svn: 180955
* Add icc support to the test suiteMatt Kopec2013-03-151-0/+51
| | | | | | | | | | -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
* Fixed test suite errors due to new clang -v output.Greg Clayton2013-03-061-5/+1
| | | | llvm-svn: 176546
* Fix the getCompilerVersion() function to do the right thing with clang 5.0 ↵Greg Clayton2013-02-281-1/+1
| | | | | | which now says "LLVM version" instead of "clang version". llvm-svn: 176282
* Cleanup TestUniqueTypes.py and add getCompilerVersion() to test harnessDaniel Malea2013-02-271-2/+20
| | | | | | | - pull up logic to get compiler version from TestUniqueTypes.py into lldbtest.py - work around an GCC 4.6.3 issue llvm-svn: 176190
* This should get clang/gcc decorators workingEnrico Granata2013-02-231-19/+44
| | | | llvm-svn: 175946
* Fixing issues in previous checkin - still figuring out how to make ↵Enrico Granata2013-02-231-73/+73
| | | | | | expectedFailureClang take the bugnumber llvm-svn: 175945
* <rdar://problem/12362092>Enrico Granata2013-02-231-66/+116
| | | | | | | | The decorators @expectedFailure (plain and special-case like i386, clang, ...) are modified to optionally take a bugnumber argument If such an argument is specified, the failure report (or unexpected success report) will include the information passed in as part of the message This is mostly useful for associating failures to issue IDs in issue management systems (e.g. the LLVM bugzilla) llvm-svn: 175942
* Make the lldbtest tear down routine a little less error proneDaniel Malea2013-02-221-6/+8
| | | | | | | - replace "catch-all" except clause with one that specifically catches what pexpect throws - handle case where child is already terminated (or is terminating) by the time tear-down is run llvm-svn: 175844
* Minor test runner improvemenstDaniel Malea2013-02-191-5/+24
| | | | | | | | - rework the way SBDebugger.SetAsync() is used to avoid side effects (reset original value at TearDownHook) - refactor expectedFailureClang (and add expectedFailureGcc decorator) - mark TestChangeValueAPI.py as expectedFailureGcc due to PR-15039 llvm-svn: 175523
* Fix misuse of python subprocess module (caused "leaking" processes and ↵Daniel Malea2013-02-151-0/+28
| | | | | | | | | | | garbling the terminal) - fixed cleanup of Popen objects by pushing spawn logic into test Base and out of test cases - connect subprocess stdin to PIPE (rather than the parent's STDIN) to fix silent terminal issue Tested on Linux and Mac OS X llvm-svn: 175301
* Disable confirmation prompts for testingDaniel Malea2013-01-251-0/+1
| | | | | | | - set auto-confirm to false when running TestExprs (avoid hang when using API) - set prompt-on-quit to false in test helper (avoid timeout when using lldb CLI) llvm-svn: 173485
* Mark test cases affected by PR 15036 (GCC-generated DWARF causes parser crash)Daniel Malea2013-01-241-0/+16
| | | | | | - Add new decorator "@skipIfGcc" to lldbtest.py llvm-svn: 173394
* The skipOnLinux decorator wasn't calling the test method correctly (no need ↵Jim Ingham2012-11-271-1/+1
| | | | | | | | to pass in the "self") resulting in errors on MacOS X for the tests so decorated. llvm-svn: 168662
* Fix for TestSharedLib.py (on Linux)Daniel Malea2012-11-261-0/+6
| | | | | | | - use lldb 'settings' command to help testcase find shared library - pull up dyldPath variable from TestLoadUnload.py to fixture base class (applicable in multiple cases) llvm-svn: 168612
* Update test status on LinuxDaniel Malea2012-11-231-0/+36
| | | | | | | | | - add decorators @expectedFailLinux and @skipOnLinux - skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426 Patch by Ashok Thirumurthi! llvm-svn: 168529
* And one more logging message goes awayEnrico Granata2012-10-241-1/+0
| | | | llvm-svn: 166628
* Reverting unwanted changes to the test suiteEnrico Granata2012-10-241-11/+2
| | | | llvm-svn: 166627
* Reverting the changes to Scalar since this class needs to follow C rules for ↵Enrico Granata2012-10-241-6/+13
| | | | | | type promotion llvm-svn: 166626
* Patch from Ashok Thirumurthi that enabled FPU registers for POSIX x86_64.Greg Clayton2012-10-241-0/+2
| | | | llvm-svn: 166604
* <rdar://problem/12481949> Fixing SBValue.GetValueAsSigned() to do the right ↵Enrico Granata2012-10-241-0/+6
| | | | | | thing when dealing with a 32-bit negative value llvm-svn: 166603
* <rdar://problem/12523238> Commit 3 of 3Enrico Granata2012-10-241-0/+21
| | | | | | | | | | Changed all relevant test cases to verify that MightHaveChildren() works correctly for objects of interest Added a bunch of convenience methods for test cases to use: target(), process(), thread() and frame() which mimic the lldb.X convenience variables As a bonus, edited the documentation on the website to describe the new method available for synthetic children providers writers to implement! That's all folks! llvm-svn: 166535
* <rdar://problem/12500212> Test case for the new plugin featureEnrico Granata2012-10-231-1/+4
| | | | llvm-svn: 166453
* If a full path to a compiler is provided on theSean Callanan2012-10-161-1/+1
| | | | | | | | | command line to dotest.py, replace / with _ in the logfile names that mention that compiler so that we don't try to put log files in weird places. llvm-svn: 166038
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-221-0/+43
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* Initial commit of a new testsuite feature: test categories.Enrico Granata2012-09-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | This feature allows us to group test cases into logical groups (categories), and to only run a subset of test cases based on these categories. Each test-case can have a new method getCategories(self): which returns a list of strings that are the categories to which the test case belongs. If a test-case does not provide its own categories, we will look for categories in the class that contains the test case. If that fails too, the default implementation looks for a .category file, which contains a comma separated list of strings. The test suite will recurse look for .categories up until the top level directory (which we guarantee will have an empty .category file). The driver dotest.py has a new --category <foo> option, which can be repeated, and specifies which categories of tests you want to run. (example: ./dotest.py --category objc --category expression) All tests that do not belong to any specified category will be skipped. Other filtering options still exist and should not interfere with category filtering. A few tests have been categorized. Feel free to categorize others, and to suggest new categories that we could want to use. All categories need to be validly defined in dotest.py, or the test suite will refuse to run when you use them as arguments to --category. In the end, failures will be reported on a per-category basis, as well as in the usual format. This is the very first stage of this feature. Feel free to chime in with ideas for improvements! llvm-svn: 164403
* Silence the "Command ... failed!" message when not running in trace mode.Johnny Chen2012-08-011-1/+1
| | | | | | You run with trace mode by passing '-t' to the test driver. llvm-svn: 161130
* Continue the cleanup started on r158737Filipe Cabecinhas2012-06-201-0/+5
| | | | | | | | Adds a utility class method to TestBase that checks and removes a temp file. Removed every use of system() to execute rm -f. llvm-svn: 158809
* Update the comments for lldbtest module. The test driver is the only way to ↵Johnny Chen2012-05-161-76/+11
| | | | | | run the test suite. llvm-svn: 156943
* The session file name should be tagged with (architecture, compiler) in additionJohnny Chen2012-04-191-1/+1
| | | | | | | to the already existing (test result, test id) to avoid collision and to facilitate postmortem analysis. llvm-svn: 155148
* Add the capability of supplying the pre/post-flight functions to the test ↵Johnny Chen2012-04-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | suite such that the pre-flight code gets executed during setUp() after the debugger instance is available and the post-flight code gets executed during tearDown() after the debugger instance has done killing the inferior and deleting all the target programs. Example: [11:32:48] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpoint config: {'pre_flight': <function pre_flight at 0x1098541b8>, 'post_flight': <function post_flight at 0x109854230>} LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug LLDB-139 Path: /Volumes/data/lldb/svn/ToT URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk Repository Root: https://johnny@llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 154753 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 154730 Last Changed Date: 2012-04-13 18:42:46 -0700 (Fri, 13 Apr 2012) lldb.pre_flight: def pre_flight(test): __import__("lldb") __import__("lldbtest") print "\nRunning pre-flight function:" print "for test case:", test lldb.post_flight: def post_flight(test): __import__("lldb") __import__("lldbtest") print "\nRunning post-flight function:" print "for test case:", test Session logs for test failures/errors/unexpected successes will go into directory '2012-04-16-11_34_08' Command invoked: python ./dotest.py -A x86_64 -v -c ../examples/test/.lldb-pre-post-flight functionalities/watchpoint/hello_watchpoint compilers=['clang'] Configuration: arch=x86_64 compiler=clang ---------------------------------------------------------------------- Collected 2 tests 1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... Running pre-flight function: for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Running post-flight function: for test case: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) ok 2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... Running pre-flight function: for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Running post-flight function: for test case: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) ok ---------------------------------------------------------------------- Ran 2 tests in 1.584s OK llvm-svn: 154847
* Add a new option to the test driver, -N dsym or -N dwarf, in order to ↵Johnny Chen2012-04-061-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exclude tests decorated with either @dsym_test or @dwarf_test to be executed during the testsuite run. There are still lots of Test*.py files which have not been decorated with the new decorator. An example: # From TestMyFirstWatchpoint.py -> class HelloWatchpointTestCase(TestBase): mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint") @dsym_test def test_hello_watchpoint_with_dsym_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDsym(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() @dwarf_test def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDwarf(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() # Invocation -> [17:50:14] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug LLDB-137 Path: /Volumes/data/lldb/svn/ToT URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk Repository Root: https://johnny@llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 154133 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 154109 Last Changed Date: 2012-04-05 10:43:02 -0700 (Thu, 05 Apr 2012) Session logs for test failures/errors/unexpected successes will go into directory '2012-04-05-17_50_49' Command invoked: python ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py compilers=['clang'] Configuration: arch=x86_64 compiler=clang ---------------------------------------------------------------------- Collected 2 tests 1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... skipped 'dsym tests' 2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.138s OK (skipped=1) Session logs for test failures/errors/unexpected successes can be found in directory '2012-04-05-17_50_49' [17:50:50] johnny:/Volumes/data/lldb/svn/ToT/test $ llvm-svn: 154154
* Fix a bug in getRunOptions() where there was no space between the arch spec ↵Johnny Chen2012-03-161-1/+1
| | | | | | and the compiler spec. llvm-svn: 152941
* Add a test case to go with <rdar://problem/11052829> and svn check-in r152809.Johnny Chen2012-03-151-1/+1
| | | | llvm-svn: 152825
* During the test case tearDown(), give it one final blow to make sure the ↵Johnny Chen2012-02-271-0/+2
| | | | | | | | child process spawned by pexpect is terminated. Fix the issue of many '(lldb)' zombie processes observed by Jim. llvm-svn: 151583
* Add safe guard for when the 'expect' program cannot be located and skip the ↵Johnny Chen2012-02-091-0/+17
| | | | | | test. llvm-svn: 150133
* Add test cases for APIs to get template arguments from an SBType.Johnny Chen2012-02-031-0/+2
| | | | llvm-svn: 149707
* lldb should warn when dSYM does not match the binary.Johnny Chen2012-02-011-6/+6
| | | | | | | | | | | | | | | | | | | o Symbols.cpp: Emit a warning message when dSYM does not match the binary. o warnings/uuid: Added regression test case. o lldbtest.py: Modified to allow test case writer to demand that the build command does not begin with a clean first; required to make TestUUIDMismatchWanring.py work. rdar://problem/10515708 llvm-svn: 149465
* o CommandObjectSettingsSet.cpp:Johnny Chen2012-01-201-0/+4
| | | | | | | | | | | | | | Fix a bug where "settings set -r th" wouldn't complete. o UserSettingsController.cpp: Fix a bug where "settings set target.process." wouldn't complete. o test/functionalities/completion: Add various completion test cases related to 'settings set' command. llvm-svn: 148596
OpenPOWER on IntegriCloud