Commit Graph

10 Commits

Author SHA1 Message Date
Davide Italiano 5858c9d69f Revert "[TestConvienceVariable] Clean the directory before running the test."
This reverts commit 9bce9d2d65, as
it breaks the bots.
2020-02-07 14:32:30 -08:00
Davide Italiano 9bce9d2d65 [TestConvienceVariable] Clean the directory before running the test. 2020-02-07 13:52:40 -08:00
Jonas Devlieghere 83a093b8ec [lldb/Reproducer] Mark some driver tests as unsupported for lldb-repro
These test are checking for diagnostics printed by the driver. During
replay we only replay the SB API calls made by the driver, so it's
expected that these messages aren't displayed.
2020-01-22 17:18:06 -08:00
Jonas Devlieghere adee6454b7 [lldb/Test] Try to appease the Windows bot
In TestConvenienceVariables I changed %t from a file to a directory.
This tripped up mkdir which can't deal with an existing file at the
given location. In order to solve this issue on the bots I added an
`rm -rf %t` statement, but now the Windows bot complains that "This
function is not supported on this system".

If you never ran the test suite wit this temporary workaround, the test
might fail. If this happens please remove what %t expands to in the lit
output and rerun the test.
2020-01-07 21:40:07 -08:00
Jonas Devlieghere 512b2c7dc7 [lldb/Test] Remove old binary created by TestConvenienceVariables
On a dirty build directory the new mkdir fails because the file already
exists and is not a directory.
2020-01-07 13:21:47 -08:00
Jonas Devlieghere 4c935c66c4 [lldb/Test] Make TestConvenienceVariables more strict
This test was passing even when the output of lldb.target was empty.
I've made the test more strict by checking explicitly for the target
name and by using CHECK-NEXT lines.
2020-01-07 13:06:13 -08:00
Pavel Labath 9c73925226 [lldb/lit] Introduce %clang_host substitutions
Summary:
This patch addresses an ambiguity in how our existing tests invoke the
compiler. Roughly two thirds of our current "shell" tests invoke the
compiler to build the executables for the host. However, there is also
a significant number of tests which don't build a host binary (because
they don't need to run it) and instead they hardcode a certain target.

We also have code which adds a bunch of default arguments to the %clang
substitutions. However, most of these arguments only really make sense
for the host compilation. So far, this has worked mostly ok, because the
arguments we were adding were not conflicting with the target-hardcoding
tests (though they did provoke an occasional "argument unused" warning).

However, this started to break down when we wanted to use
target-hardcoding clang-cl tests (D69031) because clang-cl has a
substantially different command line, and it was getting very confused
by some of the arguments we were adding on non-windows hosts.

This patch avoid this problem by creating separate %clang(xx,_cl)_host
substutitions, which are specifically meant to be used for compiling
host binaries. All funny host-specific options are moved there. To
ensure that the regular %clang substitutions are not used for compiling
host binaries (skipping the extra arguments) I employ a little
hac^H^H^Htrick -- I add an invalid --target argument to the %clang
substitution, which means that one has to use an explicit --target in
order for the compilation to succeed.

Reviewers: JDevlieghere, aprantl, mstorsjo, espindola

Subscribers: emaste, arichardson, MaskRay, jfb, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D69619
2019-10-31 10:40:37 +01:00
Jonas Devlieghere 87aa9c9e4d Re-land "[test] Split LLDB tests into API, Shell & Unit"
The original patch got reverted because it broke `check-lldb` on a clean
build. This fixes that.

llvm-svn: 374201
2019-10-09 19:22:02 +00:00
Adrian Prantl 0115c10328 Revert [test] Split LLDB tests into API, Shell & Unit
as it appears to have broken check-lldb.

This reverts r374184 (git commit 22314179f0)

llvm-svn: 374187
2019-10-09 17:35:43 +00:00
Jonas Devlieghere 22314179f0 [test] Split LLDB tests into API, Shell & Unit
LLDB has three major testing strategies: unit tests, tests that exercise
the SB API though dotest.py and what we currently call lit tests. The
later is rather confusing as we're now using lit as the driver for all
three types of tests. As most of this grew organically, the directory
structure in the LLDB repository doesn't really make this clear.

The 'lit' tests are part of the root and among these tests there's a
Unit and Suite folder for the unit and dotest-tests. This layout makes
it impossible to run just the lit tests.

This patch changes the directory layout to match the 3 testing
strategies, each with their own directory and their own configuration
file. This means there are now 3 directories under lit with 3
corresponding targets:

 - API (check-lldb-api): Test exercising the SB API.
 - Shell (check-lldb-shell): Test exercising command line utilities.
 - Unit (check-lldb-unit): Unit tests.

Finally, there's still the `check-lldb` target that runs all three test
suites.

Finally, this also renames the lit folder to `test` to match the LLVM
repository layout.

Differential revision: https://reviews.llvm.org/D68606

llvm-svn: 374184
2019-10-09 16:38:47 +00:00