summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
Commit message (Collapse)AuthorAgeFilesLines
* [test] Use a different module cache for Shell and API tests.Jonas Devlieghere2019-10-101-0/+14
| | | | | | | | | | | | | | Before the test reorganization, everything was part of a single test suite with a single module cache. Now that things are properly separated this is no longer the case. Only the shell tests inherited the logic to properly configure and wipe the module caches. This patch adds that logic back for the API tests. While doing so, I noticed that we were configuring a Clang module cache in CMake, but weren't actually using it from dotest.py. I included a fix for that in this patch as well. Differential revision: https://reviews.llvm.org/D68755 llvm-svn: 374386
* [test] Pass DSYMUTIL and SDKROOT as part of the Make invocation.Jonas Devlieghere2019-10-101-5/+36
| | | | | | | | | | Pass the DSYMUTIL and SDKROOT variables on the command line instead of the environment. This makes it easier to reproduce the make invocation during development. Differential revision: https://reviews.llvm.org/D68812 llvm-svn: 374385
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of each test case knowing its depth relative to the test root, we can just have dotest add the folder containing Makefile.rules to the include path. This was motivated by r370616, though I have been wanting to do this ever since we moved to building tests out-of-tree. The only manually modified files in this patch are lldbinline.py and plugins/builder_base.py. The rest of the patch has been produced by this shell command: find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} + Reviewers: teemperor, aprantl, espindola, jfb Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D67083 llvm-svn: 370845
* [dotest] Don't set the DWARF version override in CFLAGS_EXTRA.Jonas Devlieghere2019-08-201-1/+1
| | | | | | | | 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] Clean up test folder clean-upPavel Labath2018-03-161-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703
* Build each testcase variant in its own subdirectory and remove the srcdir ↵Adrian Prantl2018-02-061-21/+30
| | | | | | | | | | | | | | lock file This patch creates a <test>.dwarf, <test>.dwo, etc., build directory for each testcase variant. Most importantly, this eliminates the need for the per-test lock file in the source directory. Tests that are marked as NO_DEBUG_INFO_TESTCASE and build with buildDefault() are built in a <test>.default build directory. Differential Revision: https://reviews.llvm.org/D42763 llvm-svn: 324368
* Enforce that NO_DEBUG_INFO_TESTCASEs build using buildDefault().Adrian Prantl2018-01-301-1/+1
| | | | | | This is a prerequisite for building each test variant in its own subdirectory. llvm-svn: 323830
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-301-27/+44
| | | | | | | | | | | | | | | | | | | | | | | | 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
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-15/+54
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Add "-gmodules" support to the test suite.Todd Fiala2016-05-261-0/+11
| | | | | | | | | | | | | | This change adds the capability of building test inferiors with the -gmodules flag to enable module debug info support. Windows is excluded per @zturner. Reviewers: granata.enrico, aprantl, zturner, labath Subscribers: zturner, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D19998 llvm-svn: 270848
* surface build error content through test event systemTodd Fiala2016-05-141-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: print build errors nicely in test output This test infrastructure change adds a new Python exception for test subject builds that fail. The output of the build command is captured and propagated to both the textual test output display code and to the test event system. The ResultsFormatter objects have been modified to do something more useful with this information. The xUnit formatter now replaces the non-informative Python build error stacktrace with the build error content. The curses ResultsFormatter prints a 'B' for build errors rather than 'E'. The xUnit output, in particular, makes it much easier for developers to track down test subject build errors that cause test failures when reports come in from CI. Reviewers: granata.enrico Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20252 llvm-svn: 269525
* Fix compiler lookup when specified without pathPavel Labath2016-02-021-0/+2
| | | | | | | | | r259433 introduced a regression, where if a compiler is specified without a path (e.g., CC=clang, relying on the fact that clang is in $PATH), then the test suite would fail (at the compiler version detection step) because realpath would interpret this as a path relative to cwd). The fix is to perform the $PATH expansion (via `which`) before the realpath step. llvm-svn: 259484
* Fix getCompiler in unit testing framework on compiler symlinksStephane Sezer2016-02-011-1/+2
| | | | | | | | | | | | | | | | Summary: Checks using the result of getCompiler() will fail to identify the compiler correctly if CC is a symlink path (ie /usr/bin/cc). Reviewers: zturner, emaste Subscribers: llvm-commits, sas Differential Revision: http://reviews.llvm.org/D16488 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 259433
* Return gmake as the default name for GNU make on NetBSDKamil Rytarowski2015-12-071-1/+1
| | | | | | | | | | | | | | | Summary: The base make(1) on NetBSD is BSD make. In the default installation of NetBSD GNU make comes via pkgsrc under the gmake name. Reviewers: emaste, tfiala, clayborg Subscribers: joerg, lldb-commits Differential Revision: http://reviews.llvm.org/D15261 llvm-svn: 254947
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | For convenience, we had added the folder that dotest.py was in to sys.path, so that we could easily write things like `import lldbutil` from anywhere and any test. This introduces a subtle problem when using Python's package system, because when unittest2 imports a particular test suite, the test suite is detached from the package. Thus, writing "import lldbutil" from dotest imports it as part of the package, and writing the same line from a test does a fresh import since the importing module was not part of the same package. The real way to fix this is to use absolute imports everywhere. Instead of writing "import lldbutil", we need to write "import lldbsuite.test.util". This patch fixes up that and all other similar cases, and additionally removes the script directory from sys.path to ensure that this can't happen again. llvm-svn: 251886
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-0/+137
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
OpenPOWER on IntegriCloud