summaryrefslogtreecommitdiffstats
path: root/lldb/test/lldbtest.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Also except OSError when terminating a child.Hafiz Abid Qadeer2015-01-261-1/+1
| | | | | | | | | Ilia K <ki.stfu@gmail.com> sent this patch. He noted that it was possible for child to be terminated after isAlive call and before we send it quit command. In this case, sending command to it causes OSError. This patch just adds this exception to the except list. llvm-svn: 227086
* Make OSX test run firewall friendly.Oleksiy Vyalov2015-01-221-0/+5
| | | | | | http://reviews.llvm.org/D7115 llvm-svn: 226856
* Fix inlined test cases so they print out the correct command to run when ↵Greg Clayton2015-01-071-4/+6
| | | | | | | | | | | | | they fail instead of printing out incorrect information. To fix this I added a new method to TestBase: def getRerunArgs(self): return " -f %s.%s" % (self.__class__.__name__, self._testMethodName) The InlineTest which inherits from TestBase then overrides this function with a custom version which does the right thing. llvm-svn: 225407
* XFAIL all of TestInferiorAssert.py tests on Windows.Zachary Turner2014-12-091-0/+3
| | | | | | | | | | | | | | Getting this working correctly is a significant amount of work. Assertions on Windows show up as error code 0xC0000409, which is STATUS_STACK_BUFFER_OVERRUN. In order to accurately determine that this is not just any stack buffer overrun, but one triggered by a call to abort, we would need to analyze the call stack. This in turn requires better symbol support for Windows executables, and work on LLDB to make stack frames better on Windows. For now, these are XFAIL'ed and tracked in http://llvm.org/pr21793. llvm-svn: 223816
* Fix broken test suite on Windows after r223091.Zachary Turner2014-12-021-3/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D6484 Reviewed by: Oleksiy Vyalov llvm-svn: 223155
* Fix several test failures on Linux/FreeBSD caused by compiler configuration ↵Oleksiy Vyalov2014-12-011-37/+51
| | | | | | | | and invalid environment - make lldbtest.registerSharedLibrariesWithTarget to support multiple platforms. http://reviews.llvm.org/D6392 llvm-svn: 223091
* Fix several test failures on Linux/FreeBSD caused by compiler configuration ↵Oleksiy Vyalov2014-11-261-1/+5
| | | | | | | | and invalid environment. http://reviews.llvm.org/D6392 llvm-svn: 222845
* Add initial lldb-mi tests.Hafiz Abid Qadeer2014-11-251-0/+35
| | | | | | | | Test 'test_lldbmi_interrupt' is only enabled for Darwin as it seems to cause a timeout error on Linux. Patch from dawn@burble.org. llvm-svn: 222750
* Not all things callable have an im_self, so harden the test logic against ↵Enrico Granata2014-11-171-1/+1
| | | | | | that. getattr(,,None) is the closest to ?. we have in Python, so use that llvm-svn: 222160
* Fixes for remote test suite execution of the "lldb/test/lang" directory.Greg Clayton2014-11-171-0/+45
| | | | | | | | | 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
* Fix a problem reported by Ed Maste where the test harness was failing to ↵Enrico Granata2014-11-101-1/+1
| | | | | | call bound methods as cleanup hooks llvm-svn: 221624
* fix for unit tests finding path to LLDB.h http://reviews.llvm.org/D6177Shawn Best2014-11-081-1/+4
| | | | llvm-svn: 221566
* fixed minor code indenting http://reviews.llvm.org/D6127Shawn Best2014-11-061-4/+3
| | | | llvm-svn: 221467
* Allow inline test case to register actually useful teardown hooks by ↵Enrico Granata2014-11-051-1/+10
| | | | | | allowing a hook to be passed back the test instance, were it not to be already bound to self. Use this ability to make the reversal of escape-non-printables a teardown hook for added reliability of the testing logic llvm-svn: 221402
* This looks like the actual path under which the builder looks for LLDB ↵Enrico Granata2014-10-271-1/+1
| | | | | | headers, so use this path instead llvm-svn: 220718
* Patch from ovyalov@google.com:Jim Ingham2014-10-241-4/+4
| | | | | | | Handle pexpect exceptions correctly so that processes spawned with pexpect are always reaped. llvm-svn: 220583
* Added functions to the C++ API, for the benefit of non-8-bit byte architectures.Matthew Gardiner2014-10-221-0/+2
| | | | | | | | | | | | New functions to give client applications to tools to discover target byte sizes for addresses prior to ReadMemory. Also added GetPlatform and ReadMemory to the SBTarget class, since they seemed to be useful utilities to have. Each new API has had a test case added. http://reviews.llvm.org/D5867 llvm-svn: 220372
* Making all @expectedFailure markers take an explicit bugnumber annotation. ↵Enrico Granata2014-10-171-15/+16
| | | | | | This used to be optional, but that makes it harder to track what tests are failing for what reason. So, make it mandatory, in the form of refusing to run the test suite if annotations are missing llvm-svn: 220012
* Add a test for the -b (batch mode) option to the lldb driver.Jim Ingham2014-10-161-5/+9
| | | | llvm-svn: 219979
* Fix a path concatenation issue related to windows paths.Zachary Turner2014-10-141-1/+5
| | | | llvm-svn: 219730
* Fix exception text to match function nameEd Maste2014-10-071-1/+1
| | | | llvm-svn: 219181
* In some cases, the LLDB test suite will be run on a built framework with no ↵Enrico Granata2014-10-061-0/+16
| | | | | | sources coming along. In those cases, we want to skip the SB API test case. Add a marker for that, and apply it llvm-svn: 219146
* ASan malloc/free history threadsKuba Brecka2014-09-041-0/+16
| | | | | | Reviewed at http://reviews.llvm.org/D4596 llvm-svn: 217116
* Get test executables compiling on Windows.Zachary Turner2014-08-131-0/+15
| | | | | | | | | | | | | | Many of the test executables use pthreads directly. This isn't portable on Windows, so this patch converts these test to use C++11 threads and mutexes. Since Windows' implementation of std::thread classes throw and catch from header files, this patch also disables exceptions when compiling with clang on Windows. Reviewed by: Todd Fiala, Ed Maste Differential Revision: http://reviews.llvm.org/D4816 llvm-svn: 215562
* Force trace on system() failure on FreeBSD while tracking down buildbot issuesEd Maste2014-08-051-1/+6
| | | | llvm-svn: 214922
* Make the test runner understand Windows command shell execution.Zachary Turner2014-07-221-13/+15
| | | | | | | | | | | | | | | | Currently, the test runner makes the assumption that it will run commands through /bin/sh. This is obviously not true on Windows, so this patch abstracts this logic out somewhat. Instead of having the caller build the command string himself, the caller will now pass in argument list of the form [[a, b], [c, d], ...] which will get converted into a string of the form a b; c d or a b && c d, depending on the platform. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4590 llvm-svn: 213669
* Added two new test types: @debugserver_test and @llgs_test.Todd Fiala2014-04-281-0/+34
| | | | | | | | | | | | | | | TestLldbGdbServer now supports both lldb-gdbserver (llgs) and debugserver tests. Similar to the dsym/dwarf tests, they allow running the same underlying gdb remote protocol tests against lldb-gdbserver and debugserver. This will help make sure the protocol-level tests for lldb-gdbserver faithfully represent what debugserver does on OS X. Switched back gdb remote protocol test logging to warning and above (accidentally submitted it at debug level in a recent commit). llvm-svn: 207395
* Remove duplication in expectedFailure* decoratorsEd Maste2014-04-231-269/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D3452 llvm-svn: 206976
* Use libc++ on FreeBSD as on DarwinEd Maste2014-04-011-2/+11
| | | | llvm-svn: 205345
* Use libc++ on FreeBSD as on DarwinEd Maste2014-02-021-1/+1
| | | | | | | | | This could use some refinement still, but the previous behaviour of adding -stdlib=libstc++ on FreeBSD w/ Clang is the least likely case to work. llvm.org/pr17910 llvm-svn: 200646
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-131-1/+10
| | | | | | and remote targets. llvm-svn: 197266
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-2/+10
| | | | | | | | | | "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
* Added two new test case decorator functions: @skipIfRemote and ↵Greg Clayton2013-12-051-0/+28
| | | | | | | | | | @skipIfRemoteDueToDeadlock. @skipIfRemote is used to decorate test cases that don't make sense to run remotely. @skipIfRemoteDueToDeadlock indicates these tests need to be looked at and currently deadlock the running of the test suite when run on remote systems. These issues should be fixed soon. llvm-svn: 196543
* Remove print statement when successfully setting the platform's working ↵Greg Clayton2013-12-031-1/+0
| | | | | | directory. llvm-svn: 196308
* Fixed internal code to not link against and code from "lldb/API/*". Greg Clayton2013-12-021-1/+4
| | | | | | | | | | lldb_private::Debugger was #including some "lldb/API" header files which causes tools (lldb-platform and lldb-gdbserver) that link against the internals only (no API layer) to fail to link depending on which calls were being used. Also fixed the current working directory so that it gets set correctly for remote test suite runs. Now the remote working directory is set to: "ARCH/TESTNUM/..." where ARCH is the current architecture name and "TESTNUM" is the current test number. Fixed the "lldb-platform" and "lldb-gdbserver" to not warn about mismatched visibility settings by having each have their own exports file which contains nothing. This forces all symbols to not be exported, and also quiets the linker warnings. llvm-svn: 196141
* Improved platform support.Greg Clayton2013-11-231-0/+10
| | | | | | | | | | | | Improved the detection of a valid GDB server where we actually can connect to a socket, but then it doesn't read or write anything (which happens with some USB mux software). Host::MakeDirectory() now can make as many intermediate directories as needed. The testsuite now has very initial support for remote test suite running. When running on a remote platform, the setUp function for the test will make a new directory and select it as the working directory on the remote host. Added a common function that can be used to create the short option string for getopt_long calls. llvm-svn: 195541
* Mark 32/64-bit tests as expected fail after root causing and referencing ↵Matt Kopec2013-09-261-0/+36
| | | | | | | | bugzilla. Fix TestFrames.py error to check against a None pc value. llvm-svn: 191470
* Add support for TestPluginComands on Linux. Also, rework makefile dsym target.Matt Kopec2013-09-251-4/+33
| | | | llvm-svn: 191383
* test: Handle libc++ shared lib name on FreeBSDEd Maste2013-09-091-0/+6
| | | | | | | (I didn't take a guess at the Linux names, as these tests are currently skipped with the comment "No standard locations for libc++ on Linux.") llvm-svn: 190307
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-261-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Centralizing Intel compiler detection logic in lldbtest.py to avoid ↵Daniel Malea2013-08-061-0/+4
| | | | | | | | duplication in the future. - Addresses review comments from Stefanus! llvm-svn: 187816
* Allow building test suite with non-default libc++Daniel Malea2013-08-061-1/+19
| | | | | | - add new "--libcxx" parameter to dotest.py to specify path to custom libc++ llvm-svn: 187802
* Use -Wl to specify -rpath correctly.Stefanus Du Toit2013-07-301-1/+1
| | | | llvm-svn: 187431
* tests: Build test code on FreeBSD the same way as on LinuxEd Maste2013-07-251-1/+1
| | | | llvm-svn: 187155
* Fix test execution on FreeBSD versions other than 9.xEd Maste2013-07-251-0/+2
| | | | | | | | | | | | | | | The tests use a plugin based on the name from sys.platform. Unfortunately that string includes the major version number in Python 2.7, so the tests would look for builder_freebsd9.py, builder_freebsd10.py, etc. The issue doesn't affect Linux as Python returns 'linux2' also on Linux 3.x -- see http://bugs.python.org/issue12326 for details. It seems later versions of Python will drop the major version number, so adopt this convention now for FreeBSD. llvm-svn: 187121
* Add expectedFailureFreeBSD test wrapperEd Maste2013-07-241-0/+36
| | | | llvm-svn: 187069
* Update exception to match decorator nameEd Maste2013-07-091-1/+1
| | | | llvm-svn: 185891
* Add TestConcurrentEvents test for LLDB's handling of inferior threadsDaniel Malea2013-07-091-0/+16
| | | | | | | | | | | | | | - Test verifies LLDB's handling of inferiors with threads that: hit breakpoints, modfiy variables that have watchpoints set, generate user signals, and crash. - Add a few "stress tests" (with ~100 threads) -- run these with "-l" dotest.py flag. - Fix stop_reason_to_str helper in lldbutil to handle eStopReasonThreadExited. - Add sort_stopped_threads helper to lldbutil to separate thread lists based on stop reason. Logged llvm.org/pr16566 and llvm.org/pr16567 for bugs exposed. llvm-svn: 185889
* Skip tests that hang on FreeBSDEd Maste2013-06-251-0/+15
| | | | | | | There's still significant work to do in the FreeBSD port, so no point in a pr for these yet. llvm-svn: 184871
* <rdar://problem/14134716>Enrico Granata2013-06-171-4/+4
| | | | | | | | | | | | This is a rewrite of the command history facility of LLDB It takes the history management out of the CommandInterpreter into its own CommandHistory class It reimplements the command history command to allow more combinations of options to work correctly (e.g. com hist -c 1 -s 5) It adds a new --wipe (-w) option to command history to allow clearing the history on demand It extends the lldbtest runCmd: and expect: methods to allow adding commands to history if need be It adds a test case for the reimplemented facility llvm-svn: 184140
OpenPOWER on IntegriCloud