summaryrefslogtreecommitdiffstats
path: root/lldb/test/api
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2819-1041/+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-273-3/+3
| | | | llvm-svn: 251444
* Fixed the test suite on MacOSX so that ↵Greg Clayton2015-10-263-9/+0
| | | | | | | | | | "test/api/multithreaded/TestMultithreaded.py" works without errors. The problem was that the @skipIfNoSBHeaders on darwin was trying to use self.lib_dir when it hadn't been set yet. I looked at the code and places were required to set "self.lib_dir" for no real reason as all places that used it just used the LLDB_LIB_DIR environment variable. So I removed all uses of self.lib_dir and replaced them to use 'os.environ["LLDB_LIB_DIR"]'. Did the same for self.implib_dir. llvm-svn: 251315
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-233-3/+9
| | | | | | | | | | | | | 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-223-21/+0
| | | | | | | | | | | | | | | | | | | | | 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
* Use six to portably handle module renames in Python 2 and 3Zachary Turner2015-10-213-3/+9
| | | | llvm-svn: 250915
* Skip TestMultithreaded on Windows.Adrian McCarthy2015-10-211-14/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D13923 llvm-svn: 250899
* Reduce load on TestMultipleDebuggers.Todd Fiala2015-10-061-1/+1
| | | | | | | | | 4-core CPUs have a hard time keeping up with the number of debuggers we were simultaneously spawning. This leads to a timeout, which leaves processes hanging around in "suspended mode", which can't be killed with signals. llvm-svn: 249421
* Last set of XFAILs for Windows.Zachary Turner2015-09-161-0/+1
| | | | llvm-svn: 247825
* Mark TestMultipleDebuggers as flakey on Darwin.Todd Fiala2015-09-151-0/+1
| | | | | | | See if this gets us past a few machines that are failing it when it is expected to pass. llvm-svn: 247665
* OS X unexpected success cleanupTodd Fiala2015-09-141-1/+0
| | | | | | | | | | 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
* Add expectedFlakeyFreeBSD to TestMultithreaded testsEd Maste2015-09-141-0/+3
| | | | | | One or more of these tests failed in 25 of 100 dotest.py runs. llvm-svn: 247566
* XFAIL Tests that require C++ exceptions on Windows.Zachary Turner2015-08-211-0/+4
| | | | | | | | | clang-cl does not yet support C++ exceptions, so these tests will not even compile. Re-enabling these tests is tracked by llvm.org/pr24538 llvm-svn: 245747
* Don't let a test fail because of a teardown command returning an error. Use ↵Greg Clayton2015-07-101-3/+1
| | | | | | a function that doesn't check the return value. llvm-svn: 241879
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-1/+1
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Mark test_sb_api_listener_event_process_state as flakeyYing Chen2015-07-011-0/+1
| | | | llvm-svn: 241203
* Revert "Mark test_sb_api_listener_event_process_state as flakey"Ying Chen2015-06-291-1/+0
| | | | | | | This reverts commit a4f5f4da7e164b7ac358a75f2e4254c25718ad4b. This test fails 100% with gcc4.9.2, revert it first. Will find out why xfail is overruled by xflaky. llvm-svn: 241014
* Mark test_sb_api_listener_event_process_state as flakeyTamas Berghammer2015-06-291-0/+1
| | | | llvm-svn: 240964
* Fix TestMultithreaded.Chaoren Lin2015-05-291-1/+1
| | | | llvm-svn: 238529
* Refactor test runner to print sub-test-case pass/fail rate.Zachary Turner2015-05-281-1/+1
| | | | llvm-svn: 238467
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* TestPublicAPIHeaders.py - Changed expectedFailureDarwin to skipIfDarwinVince Harron2015-05-121-1/+2
| | | | | | expectedFailure doesn't work if the failure is in a teardown step. llvm-svn: 237089
* Working on getting the OSX build greenVince Harron2015-05-121-0/+1
| | | | | | | | | | | | | | Added missing SBLanguageRuntime.h to lldb.xcodeproj, set to Public (fixed compile error in TestPublicAPIHeaders) Removed reference to (temporarily) missing gtest.xcodeproj Fixed TestDeadStrip compile error XFAIL TestPublicAPIHeaders - test passes but teardown command 'settings remove target.env-vars DYLD_LIBRARY_PATH' fails XFAIL TestCModules - use of undeclared identifier 'MIN' XFAIL TestModulesAutoImport - clang: error: unknown argument: '-gmodules' XFAIL TestObjCNewSyntax - expr -- @((char*)"Hello world" + 6) cannot box a string value because NSString has not been declared http://reviews.llvm.org/D9643 llvm-svn: 237085
* Mark TestMultithreaded.test_sb_api_listener_resume as XFAIL with gcc 4.8 and ↵Oleksiy Vyalov2015-05-051-1/+1
| | | | | | higher. llvm-svn: 236549
* XFAILing a test that fails with gcc 4.9 x86_64Vince Harron2015-05-041-0/+1
| | | | llvm-svn: 236407
* TestMultithreaded improvementsVince Harron2015-05-041-12/+11
| | | | | | | | | | | | | | These tests link against host lldb API. Compiler's target triple must match liblldb triple. Instead of naively skipping i386, I added a check of the liblldb arch against the compiler target arch. This is useful for 32 bit API builds (planned for Windows) Since remote is disabled, we can assume the os is the same. Also, removed skipIfLinuxClang because it's passing llvm-svn: 236396
* XFAIL tests that are failed on linux with gcc-4.9.2Ying Chen2015-04-211-0/+3
| | | | | | | | | | | | | | | | | | | Summary: - add decorator functions to xfail and skip test on specific os, architecture and version of comipler - xfail failing test with gcc-4.9.2 on linux - add one usage of skipIf function Test Plan: Run tests with different archs, and version of compilers to verify decorator function working as expected Run tests with gcc-4.9.2 and no failure reported Reviewers: sivachandra, ovyalov, vharron, chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8851 llvm-svn: 235368
* Many many test failures after some recent changes. The problem is ↵Greg Clayton2015-04-021-3/+3
| | | | | | | | | | | | | | | | lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin". There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a: lldbtest.platformIsDarwin() which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function: lldbtest.getDarwinOSTriples() Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well. llvm-svn: 233933
* Update sys.platform switched behavior in tests to use self.getPlatform ↵Robert Flack2015-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | (remote target platform) Uses target platform when determining which platform specific behavior to use or expect in tests. TestHelp.py was unchanged because this is asserting behavior of the local lldb binary. Test Plan: Run tests on different remote os. Several previously failing tests now pass: TestArrayTypes.py TestInferiorChanged.py TestInferiorCrashing.py TestIvarProtocols.py TestProcessIO.py TestPublicAPIHeaders.py TestRecursiveInferior.py Differential Revision: http://reviews.llvm.org/D8747 llvm-svn: 233805
* Fix lld command on Windows for many tests.Adrian McCarthy2015-03-273-0/+3
| | | | llvm-svn: 233416
* Make OSX test run firewall friendly.Oleksiy Vyalov2015-01-222-1/+4
| | | | | | http://reviews.llvm.org/D7115 llvm-svn: 226856
* fix Bug21211 : reworked ↵Shawn Best2014-11-212-17/+49
| | | | | | | | | | | | | | | | | | | | | test/api/multithreaded/test_listener_event_description.cpp to work properly on Linux/FreeBSD Issue D5632 fixed an issue where linux would dump spurious output to tty on startup (due to a broadcast stop event). After the checkin, it was noticed on FreeBSD a unit test was now failing. On closer investigation I found the test was using the C++ API to launch an inferior while using an SBListener to monitor the public state changes. As on OSx, it was expecting to see: eStateRunning eStateStopped On Linux/FreeBSD, there is an extra state change eStateLaunching eStateRunning eStateStopped I reworked the test to work for both cases and re-enabled the test of FreeBSD. Differential Revision: http://reviews.llvm.org/D5837 llvm-svn: 222511
* add Makefile rule for test program CREATE_STD_THREADSShawn Best2014-11-141-1/+1
| | | | | | | | | Effectively removes -lpthreads from linux/gcc build of test programs in test/api/multithreaded. This was done due to that combination causing a test program to hang due, likely due to an issue with gcc linker and libstdc++ conflicting pthreads code in test program and pthread used by lldb. Issue has been documented at: http://llvm.org/bugs/show_bug.cgi?id=21553 Differential Revision: http://reviews.llvm.org/D5838 llvm-svn: 222031
* Make the "synchronous" mode actually work without race conditions.Greg Clayton2014-10-211-0/+1
| | | | | | There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be. llvm-svn: 220254
* Some more test markingEnrico Granata2014-10-162-11/+4
| | | | llvm-svn: 219981
* This test needs the SB headers to make senseEnrico Granata2014-10-161-2/+2
| | | | llvm-svn: 219980
* Add decorator for FreeBSD failureEd Maste2014-10-081-0/+1
| | | | | | llvm.org/pr21211 llvm-svn: 219329
* This test also relies on the SB API headers. Same logicEnrico Granata2014-10-061-0/+4
| | | | llvm-svn: 219147
* In some cases, the LLDB test suite will be run on a built framework with no ↵Enrico Granata2014-10-061-0/+1
| | | | | | 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
* Add ENABLE_THREADS for these threaded testsEd Maste2014-10-022-0/+2
| | | | | | On at least FreeBSD linking with -lpthread is needed for std::thread. llvm-svn: 218899
* Add some tests to be skipped when run remotely and also fixed a test to be ↵Greg Clayton2014-09-181-0/+4
| | | | | | more reliable when it comes to stopping on a specific line. llvm-svn: 218079
* Clean up after the multithreaded test case finishes.Jason Molenda2014-08-261-0/+3
| | | | | | | Patch by Sean Callanan. <rdar://problem/18140875> llvm-svn: 216504
* Get test executables compiling on Windows.Zachary Turner2014-08-131-3/+6
| | | | | | | | | | | | | | 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
* Add FreeBSD decorator for TestMultipleDebuggersEd Maste2014-07-121-0/+1
| | | | | | llvm.org/pr20282 llvm-svn: 212877
* Flipped intermittent test failures from skip to XFAIL.Todd Fiala2014-07-101-0/+2
| | | | | | | | | | | | | | | | | | The following intermittently-failing tests have been flipped from skip to XFAIL on some combo of Linux and MacOSX: TestCallStopAndContinue.py (Linux, MacOSX) TestCallWithTimeout.py (Linux) TestConvenienceVariables.py (Linux) TestStopHookMultipleThreads.py (Linux) The following new tests have been marked XFAIL but are just intermittently failing: TestMultipleDebug.py (definitely intermittent on MacOSX, not sure I've seen it pass yet on Linux) llvm-svn: 212762
* Get the inferior binary's name via the command line argument insteadJason Molenda2014-07-101-2/+24
| | | | | | of hardcoding it. llvm-svn: 212698
* Fix test name.Jason Molenda2014-07-101-1/+1
| | | | llvm-svn: 212694
* Add a new 'stresstest' category, set the api/multiple-debuggers test case as ↵Jason Molenda2014-07-101-0/+1
| | | | | | a stresstest. llvm-svn: 212673
* Add a new test in api/multiple-debuggers which tries to create 50Jason Molenda2014-07-104-0/+330
| | | | | | | | | | | | | | | | | | | | | | | debug sessions simultaneously to expose race conditoin/locking issues. This directory has an inferior program, testprog.cpp that has a couple of functions we can put breakpoints on. It has a driver program, multi-process-driver.cpp, which links against the LLDB solib and uses the SB APIs. It creates 50 pthreads, creates a debugger on all of them, launches a debug session of the inferior testprog, hits a couple breakpoints, walks the stack, continues, etc., and then kills the inferior and ends the debug session. A pass is if all fifty debug sessions complete successfully in the alloted time (~60 seconds). We may need to tweak this one to work correctly on different platforms/targets but I wanted to get it checked in to start. llvm-svn: 212671
* Fix broken TestMultithreaded on Linux.Todd Fiala2014-05-131-2/+0
| | | | | | | | The clean line is failing under Ubuntu 12.04/gcc. It cleans fine without it on MacOSX. It doesn't clean right on Linux but at least now it doesn't fail the test. llvm-svn: 208713
OpenPOWER on IntegriCloud