summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
Commit message (Collapse)AuthorAgeFilesLines
* [dotest] Don't spend time replacing spaces in print output.Jonas Devlieghere2019-08-281-8/+0
| | | | | | | Replacing all spaces with dashes seems like a lot of needless work for a string that's just printed. llvm-svn: 370231
* [dotest] Remove -q (quiet) flag.Jonas Devlieghere2019-08-281-15/+7
| | | | | | | | | | | | | | This patch removes the -q (quiet) flag and changing the default behavior. Currently the flag serves two purposes that are somewhat contradictory, as illustrated by the difference between the argument name (quiet) and the configuration flag (parsable). On the one hand it reduces output, but on the other hand it prints more output, like the result of individual tests. My proposal is to guard the extra output behind the verbose flag and always print the individual test results. Differential revision: https://reviews.llvm.org/D66837 llvm-svn: 370226
* [dotest] Remove check for LLDB_TESTSUITE_FORCE_FINISHJonas Devlieghere2019-08-271-6/+0
| | | | llvm-svn: 370120
* [dotest] Remove results portJonas Devlieghere2019-08-271-10/+0
| | | | | | | | | | The results port was used by dosep.py to deal with test results coming form different processes. With dosep.py gone, I don't think we need this any longer. Differential revision: https://reviews.llvm.org/D66811 llvm-svn: 370090
* [dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere2019-08-271-7/+0
| | | | | | | | | | | | Today I discovered the skipLongRunningTest decorator and to my surprise all the tests were passing without the decorator. They don't seem to be that expensive either, they take a few seconds but we have tests that take much longer than that. As such I propose to remove the decorator and enable them by default. Differential revision: https://reviews.llvm.org/D66774 llvm-svn: 369995
* [dotest] Print invocation when encountering an error.Jonas Devlieghere2019-08-261-2/+6
| | | | | | | | | | | With this patch dotest.py will print the full invocation whenever it fails to parse its arguments. The dotest invocation is usually build up with different inputs, potentially coming from CMake, lldb-dotest, lit or passed directly. This can make debugging hard, especially on CI, where there might be another layer of indirection. This aims to make that a bit easier. llvm-svn: 369922
* [dotest] Don't set the DWARF version override in CFLAGS_EXTRA.Jonas Devlieghere2019-08-201-5/+4
| | | | | | | | We cannot override the DWARF version in the CFLAGS_EXTRA because they are used by tests that explicitly build without debug info. Instead, we pass them through the regular CFLAGS. llvm-svn: 369477
* [dotest] Add --dwarf-version to override the tested DWARF version.Jonas Devlieghere2019-08-191-2/+8
| | | | | | | | | | | | | On the matrix bot on GreenDragon [1] we want to run the test suite against different DWARF versions. The idea here is not to replace targeted tests for certain DWARF features, but rather to provide an easy way to support this configuration. [1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ Differential revision: https://reviews.llvm.org/D66370 llvm-svn: 369272
* Update Python tests for lldb-server on WindowsAaron Smith2019-08-141-2/+2
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and reviewers for all the help with this patch! Reviewers: labath, jfb, clayborg Reviewed By: labath Subscribers: Hui, clayborg, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61687 llvm-svn: 368776
* [dotest] Remove multiprocessingJonas Devlieghere2019-07-301-72/+4
| | | | | | | | | | | Now that the Xcode project is removed, I want to focus on dotest as a test framework, and remove its driver capabilities for which we already rely on llvm's lit. Removing multiprocessing is the first step in that direction. Differential revision: https://reviews.llvm.org/D65311 llvm-svn: 367331
* [dotest] Remove dead codeJonas Devlieghere2019-07-261-43/+2
| | | | | | Remove some dead code that I ran into when preparing D65311. llvm-svn: 367079
* [lldb][test_suite] skip tests of `libstdcpp` on Android and clean upAlex Langford2019-07-231-1/+3
| | | | | | | | | | | | | | | | Summary: Delete the android target from `libstdcpp` test category, since android no longer support libstdcxx Reviewers: xiaobai, labath Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64771 llvm-svn: 366770
* [lldb][NFC] Cleanup mentions and code related to lldb-miRaphael Isemann2019-07-191-18/+1
| | | | | | | | | | | | | | | | Summary: lldb-mi has been removed, but there are still a bunch of references in the code base. This patch removes all of them. Reviewers: JDevlieghere, jfb Reviewed By: JDevlieghere Subscribers: dexonsmith, ki.stfu, mgorny, abidh, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64992 llvm-svn: 366590
* [dotest] Add the ability to set environment variables for the inferior.Jonas Devlieghere2019-06-261-0/+3
| | | | | | | | | | | This patch adds a dotest flag for setting environment variables for the inferior. This is different from the current --env flag, which sets variables in the debugger's environment. This allows us to set things like LD_LIBRARY_PATH for testing. Differential revision: https://reviews.llvm.org/D63790 llvm-svn: 364443
* [lldb] [test] Watchpoint tests can be always run as root on NetBSDMichal Gorny2019-06-171-0/+2
| | | | llvm-svn: 363551
* [lldb] [test] Skip watchpoint tests on NetBSD if userdbregs is disabledMichal Gorny2019-06-171-0/+25
| | | | | | | | | | | Skip watchpoint tests if security.models.extensions.user_set_dbregs is disabled. This indicates that unprivileged processes are not allowed to write to debug registers which is a prerequisite for using hardware watchpoints. Differential Revision: https://reviews.llvm.org/D63380 llvm-svn: 363536
* Use list comprehension instead of map/filter to prepare Python2/3 compatSerge Guelton2019-03-211-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59579 llvm-svn: 356647
* Add ASAN llvm build directory variants toJason Molenda2019-03-081-0/+3
| | | | | | get_llvm_bin_dirs(). llvm-svn: 355661
* [Python] Update checkDsymForUUIDIsOn to be compatible with Python 3.Davide Italiano2019-01-101-4/+5
| | | | | | | | | | | | | | | | Summary: In python 2, strings and bytes are the same, but they're not in python 3, hence the return of read() needs an explicit conversion. While I'm around, rename the return of Popen() from `pipe` to `process`, as that's what Popen returns. Reviewers: JDevlieghere, friss, zturner, aprantl, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56517 llvm-svn: 350788
* When no FileCheck binary is specified, look in the llvm/clang binJason Molenda2018-11-011-0/+32
| | | | | | | dirs relative to the source directory (Xcode build style) to find one, use it if found. llvm-svn: 345912
* [dotest] Make a missing FileCheck binary a warning, not an errorVedant Kumar2018-10-121-4/+8
| | | | | | | | | | This allows bots which haven't updated to pass in --filecheck to dotest.py to run more tests. FileCheck-dependent tests will continue to fail. Differential Revision: https://reviews.llvm.org/D53175 llvm-svn: 344401
* Allow use of self.filecheck in LLDB tests (c.f self.expect)Vedant Kumar2018-09-181-0/+7
| | | | | | | | | | | | | Add a "filecheck" method to the LLDB test base. This allows test authors to pattern match command output using FileCheck, making it possible to write stricter tests than what `self.expect` allows. For context (motivation, examples of stricter checking, etc), see the lldb-dev thread: "Using FileCheck in lldb inline tests". Differential Revision: https://reviews.llvm.org/D50751 llvm-svn: 342508
* [dotest] Make --test-subdir work with --no-multiprocessVedant Kumar2018-08-161-6/+11
| | | | | | | | | | | | | | | | | | | The single-process test runner is invoked in a number of different scenarios, including when multiple test dirs are specified or (afaict) when lit is used to drive the test suite. Unfortunately the --test-subdir option did not work with the single process test runner, breaking an important use case (using lit to run swift-lldb Linux tests): Failure URL: https://ci.swift.org/job/swift-PR-Linux/6841 We won't be able to run lldb tests within swift PR testing without filtering down the set of tests. This change makes --test-subdir work with the single-process runner. llvm-svn: 339929
* Add a new tool named "lldb-vscode" that implements the Visual Studio Code ↵Greg Clayton2018-08-161-0/+13
| | | | | | | | | | | | Debug Adaptor Protocol This patch adds a new lldb-vscode tool that speaks the Microsoft Visual Studio Code debug adaptor protocol. It has full unit tests that test all packets. This tool can be easily packaged up into a native extension and used with Visual Studio Code, and it can also be used by Nuclide Differential Revision: https://reviews.llvm.org/D50365 llvm-svn: 339911
* [testsuite] Implement a category to skip libstdcxx testsDavide Italiano2018-07-101-0/+18
| | | | | | | | | | | | | | | | On systems where it's not supported. As far as I understand Linux is the only systems which now ships with libstdcxx (maybe NetBSD?, but I'm not entirely sure of the state of lldb on the platform). We could make this more fine grained looking for the header as we do for libcxx. This is a little tricky as there's no such thing as /usr/include/c++/v1, but libstdcxx encodes the version number in the path (i.e. /usr/include/c++/5.4). I guess we might match a regex, but it seems fragile to me. Differential Revision: https://reviews.llvm.org/D49110 llvm-svn: 336724
* [lit, lldbsuite] Add a bug reference to the failing TestLinuxCore and fix an ↵Stella Stamenova2018-05-091-2/+2
| | | | | | | | | | | | | | | | | | undefined property in dotest.py Summary: 1) In TestLinuxCore rather than skipping the tests on Windows, mark them as expected failures and add a bug reference 2) In dotest.py replace the undefined property in the exceptions with the actual property causing the exception Reviewers: asmith, labath, zturner Reviewed By: labath, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46590 llvm-svn: 331886
* Test Commit: fix a comment to be grammatically correctStella Stamenova2018-05-071-1/+1
| | | | llvm-svn: 331679
* [dotest] Make the set of tests independent of the test configurationPavel Labath2018-04-241-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: In the magic test duplicator, we were making the decision whether to create a test variant based on the compiler and the target platform. This meant that the set of known tests was different for each test configuration. This patch makes the set of generated test variants static and handles the skipping via runtime checks instead. This is more consistent with how we do other test-skipping decision (e.g. for libc++ tests), and makes it easier to expose the full set of tests to lit, which now does not need to know anything about what things can potentially cause tests to appear or disappear. Reviewers: JDevlieghere, aprantl Subscribers: eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D45949 llvm-svn: 330708
* [dotest] Fix syntax error and typo.Jonas Devlieghere2018-04-121-1/+1
| | | | | | Python uses `elif` rather than `else if`. Fixes r329889. llvm-svn: 329890
* [dotest] Use in-tree dsymutil on DarwinJonas Devlieghere2018-04-121-0/+6
| | | | | | | | | | | | | | | | | | | Summary: With the upstream implementation of dsymutil containing almost all functionality from the one shipped with Xcode, we want to use the in-tree version for running the test suite. This will also allow us to re-enable TestUnicodeSymbols which was failing because of the discrepancy in how Unicode symbols were hashed in lldb and older versions of dsymutil. Reviewers: aprantl, davide, jingham, labath Subscribers: mgorny, llvm-commits, lldb-commits Differential Revision: https://reviews.llvm.org/D45518 llvm-svn: 329889
* [dotest] --skip-category should append and not override.Davide Italiano2018-04-051-1/+1
| | | | | | <rdar://problem/38566150> llvm-svn: 329358
* [test] Skip a test when using an out-of-tree debugserverVedant Kumar2018-03-081-0/+3
| | | | | | | | | | | | | | | | | | | | The test "test_fp_special_purpose_register_read" in TestRegisters.py fails on Darwin machines configured to use an out-of-tree debugserver. The error message is: 'register read ftag' returns expected result, got 'ftag = 0x80'. This indicates that the debugserver in use is too old. This commit introduces a decorator which can be used to skip tests which rely on having a just-built debugserver. This resolves the issue: $ ./bin/llvm-dotest -p TestRegisters.py -v 1 out of 617 test suites processed - TestRegisters.py Test Methods: 7 Success: 6 Skip: 1 ... llvm-svn: 327052
* Use an alternative approach to prevent Spotlight from indexing the build ↵Adrian Prantl2018-02-021-8/+0
| | | | | | directory. llvm-svn: 324115
* Create a marker for Spotlight to never index $BUILD_DIR.Adrian Prantl2018-02-011-2/+11
| | | | | | | | | | LLDB queries Spotlight to locate .dSYM bundles based on the UUID embedded in a binary, and because the UUID is a hash of filename and .text section, there *will* be conflicts inside $BUILD_DIR. This should fix the broken green dragon bots. llvm-svn: 324019
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-301-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of a discussion on lldb-dev, see http://lists.llvm.org/pipermail/lldb-dev/2018-January/013111.html for background. For each test (should be eventually: each test configuration) a separate build directory is created and we execute make VPATH=$srcdir/path/to/test -C $builddir/path/to/test -f $srcdir/path/to/test/Makefile -I $srcdir/path/to/test In order to make this work all LLDB tests need to be updated to find the executable in the test build directory, since CWD still points at the test's source directory, which is a requirement for unittest2. Although we have done extensive testing, I'm expecting that this first attempt will break a few bots. Please DO NOT HESITATE TO REVERT this patch in order to get the bots green again. We will likely have to iterate on this some more. Differential Revision: https://reviews.llvm.org/D42281 llvm-svn: 323803
* [lldbtestsuite] Don't crash on `None` input for is_exe().Davide Italiano2018-01-261-0/+2
| | | | | | | | Now the function returns `False`, and the caller can take the appropriate action (in this case, for --executable, reporting that the file doesn't exist). llvm-svn: 323566
* [dotest] Remove crashinfo hookPavel Labath2018-01-101-1/+0
| | | | | | | | | | | | | | | | Summary: This used to be important when all tests were run in a single process, but that has no longer been the case for a while. Furthermore, this hook fails to build on new mac versions for several people, and it's not clear whether fixing it is worth the effort. Reviewers: jingham, clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D41871 llvm-svn: 322167
* Revert "[lldbtests] Handle errors instead of crashing."Pavel Labath2017-10-241-5/+1
| | | | | | | | | | | | | The commit breaks the case where you specify just a filename to the compiler. Previously, it would look up the compiler in your path, now it complains that the compiler is not found. One of the lldb buildbots is depending on this. It seems like a nice feature to have, as it means less typing and being able to avoid hard-coding the system compiler path in the bot config. This reverts commit r316393. llvm-svn: 316451
* [lldbtests] Handle errors instead of crashing.Davide Italiano2017-10-231-1/+5
| | | | | | | | | | | | | | | | | | If you pass an invalid compiler/debugger path on the cmdline to `dotest.py` this is what you get. Traceback (most recent call last): [...] File "dotest.py", line 7, in <module> lldbsuite.test.run_suite() [...] And with the patch applied: /home/davide/work/build-lldb/bin/clandasfasg is not a valid path, exiting Differential Revision: https://reviews.llvm.org/D39199 llvm-svn: 316393
* Centralize libc++ test skipping logicPavel Labath2017-03-291-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This aims to replace the different decorators we've had on each libc++ test with a single solution. Each libc++ will be assigned to the "libc++" category and a single central piece of code will decide whether we are actually able to run libc++ test in the given configuration by enabling or disabling the category (while giving the user the opportunity to override this). I started this effort because I wanted to get libc++ tests running on android, and none of the existing decorators worked for this use case: - skipIfGcc - incorrect, we can build libc++ executables on android with gcc (in fact, after this, we can now do it on linux as well) - lldbutil.skip_if_library_missing - this checks whether libc++.so is loaded in the proces, which fails in case of a statically linked libc++ (this makes copying executables to the remote target easier to manage). To make this work I needed to split out the pseudo_barrier code from the force-included file, as libc++'s atomic does not play well with gcc on linux, and this made every test fail, even though we need the code only in the threading tests. So far, I am only annotating one of the tests with this category. If this does not break anything, I'll proceed to update the rest. Reviewers: jingham, zturner, EricWF Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D30984 llvm-svn: 299028
* Fix remote test suite directory creationPavel Labath2017-03-201-2/+9
| | | | | | | | | | | | | | | r298203 make SBPlatform::MakeDirectory less recursive, which breaks the test suite creation of test directory hierarchy creation on the remote target. Since the function was never fully recursive, and the name does not imply recursiveness, I fix the problem by modifying the test runner to do the recursion manually. I also make the runner complain more loudly when it fails to create the directory -- previously it just printed the error to stdout and caused most of the tests to hang, which is not very helpful in diagnosing the problem. llvm-svn: 298261
* allow for specification of compiler/lldb executables basenameTim Hammerquist2017-03-171-0/+4
| | | | llvm-svn: 298123
* executables should be validated before spawning subprocessesTim Hammerquist2017-03-171-2/+14
| | | | | | | | | | | | | | dotest.py script doesn't validate executables passed on the command line before spawning dozens of subprocesses, all of which fail silently, leaving an empty results file. We should validate the lldb and compiler executables on configuration, aborting when given invalid paths, to prevent numerous, cryptic, and spurious failures. <rdar://problem/31117272> llvm-svn: 298111
* dotest.py: remove the ability to specify different architectures/compilers ↵Pavel Labath2017-03-151-128/+87
| | | | | | | | | | | | | | | | | | | | | | | | | in a single invocation Summary: This has been broken at least since the new test result framework was added, which was over a year ago. It looks like nobody has missed it since. Removing this makes the gmodules handling code saner, as it already did not know how to handle the multiple-compilers case. My motivation for this is libc++ data formatters support on android -- I am trying make a central way of determining whether libc++ tests can be run, and without this, I would have to resort to similar hacks as the gmodules code. Reviewers: jingham, zturner Subscribers: danalbert, tfiala, lldb-commits Differential Revision: https://reviews.llvm.org/D30779 llvm-svn: 297811
* [CMake] Override debugserver to use the build tree on DarwinChris Bieneman2017-03-141-0/+3
| | | | | | This patch adds support to the test suite for overriding the path to debugserver, and uses the override to point to the build tree's debugserver on Darwin. llvm-svn: 297776
* [Test-Suite] Speculative fix for darwin botsChris Bieneman2016-10-311-2/+2
| | | | | | When building with Xcode it looks like some of the logic in my test changes went haywire. This should fix it. llvm-svn: 285646
* [Test Suite] Properly respect --framework optionChris Bieneman2016-10-311-0/+3
| | | | | | | | | | | | | | | Summary: dotest.py has a framework option that is not respected. This patch makes the framework path properly configurable via the --framework option. This patch also adds a function to the lldbtest.Base class named "hasDarwinFramework" which allows us to not rely on the host platform to determine if a framework is present. If running on Darwin, and not building a framework, this will follow the *nix code paths which are appropriate for Darwin. Reviewers: tfiala Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D25886 llvm-svn: 285541
* [Test Suite] Allow overriding codesign identityChris Bieneman2016-10-211-0/+2
| | | | | | | | | | | | Summary: Not everyone names their code sign identity "lldb_codesign", so it is nice to allow this to be overridden. Reviewers: zturner, tfiala Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25714 llvm-svn: 284893
* Fix lookup path for lldb-miChris Bieneman2016-10-121-6/+7
| | | | | | | | | | | | | | | | | Summary: The test suite calls realpath on the lldb executable then append "-mi" to it to find the path of the lldb-mi executable. This does not work when using CMake builds on *nix platforms. On *nix platforms when a version number is set on executables CMake generates the binary as ${name}-${version} with a symlink named ${name} pointing to it. This results in the lldb executable being named lldb-4.0.0, and since lldb-4.0.0-mi doesn't ever match the lldb-mi executable these tests are always disabled. This patch looks for lldb-mi in the same directory as lldb. Reviewers: zturner, tfiala Subscribers: ki.stfu, enlight, lldb-commits Differential Revision: https://reviews.llvm.org/D25486 llvm-svn: 284041
* Improvements to testing blacklistFrancis Ricci2016-10-041-22/+14
| | | | | | | | | | | | | | | | | | | Summary: This patch is necessary because individual test cases are not required to have unique names. Therefore, test cases must now be specified explicitly in the form <TestCase>.<TestMethod>. Because it works by regex matching, passing just <TestCase> will still disable an entire file. This also allows for multiple exclusion files to be specified. Reviewers: zturner, labath, jingham, tfiala Subscribers: lldb-commits, sas Differential Revision: https://reviews.llvm.org/D24988 llvm-svn: 283238
OpenPOWER on IntegriCloud