llvm-capstone/libcxx
Louis Dionne 80a2ddf65c [libc++] Add an alternative Lit test format
This new test format is simpler and more flexible. It creates Lit ShTests
on the fly that reuse existing substitutions (like %{cxx}) instead of
having complex logic in Python to run the tests. This has the benefit
that virtually no coding is required to customize how the test suite is
run -- one can achieve pretty much anything by defining the appropriate
substitutions in a simple lit.cfg file.

For example, in order to run the tests on an embedded device after
building with a specific SDK, one can set the %{cxx} and %{compile_flags}
substitutions to use that SDK, and the %{exec} substitution to the ssh.py
script currently used for .sh.cpp tests with a remote executor. Dealing with
the SSHExecutor becomes unnecessary, since all tests are treated like ShTests.

As a side effect of this design, configuration files for the test
suite can be as simple as:

	config.substitutions.append(('%{cxx}', '<path-to-compiler>'))
	config.substitutions.append(('%{compile_flags}', '<flags>'))
	config.substitutions.append(('%{link_flags}', '<flags>'))
	config.substitutions.append(('%{exec}', '<script-to-execute>'))

This should allow storing lit.cfg files for various configurations
directly in the repository instead of relying on complicated logic
in config.py to set up the right flags. I've found numerous problems
in that logic in the past years, and it seems like having simple and
explicit configuration files for the configurations we support is
going to solve most of these problems. Specifically, I am hoping to
store configuration files for testing other Standard Libraries in
the repository.

Improving the interaction with the test suite configuration is still a
work in progress, so for now this test format reuses the substitutions and
available features that are set up by the current config.py.

This new test format should support pretty much everything that the current
test format supports, however it will not be enabled by default at first to
make sure we're satisfied with it. For a short period of time, the new format
will require `--param=use_new_format=True` to be enabled, however it is a very
short term goal to replace the current testing format entirely and to simplify
the configuration accordingly.

Differential Revision: https://reviews.llvm.org/D77338
2020-04-03 11:35:27 -04:00
..
benchmarks Revert "[libcxx] Enable C++17 for the benchmarks." 2020-03-12 22:23:46 +01:00
cmake [libc++] Try to fix Chromium's build 2020-04-02 13:15:30 -04:00
docs [libc++] NFC: Add documentation for writing tests 2020-04-02 17:14:45 -04:00
fuzzing [libc++] Tolerate NaN returning random distributions for now 2019-12-12 17:11:13 -05:00
include [libc++] Fix is_pointer support for Objective-C++ 2020-04-03 11:09:59 -04:00
lib [libc++] Add SHA for C++20 Synchronization Library in ABI changelog 2020-03-11 16:13:13 -04:00
src Remove legacy CMake targets for libcxx and libcxxabi 2020-03-30 09:45:21 -04:00
test [libc++] Add an alternative Lit test format 2020-04-03 11:35:27 -04:00
utils [libc++] Add an alternative Lit test format 2020-04-03 11:35:27 -04:00
www [libc++] [NFC] Test that correct value category is used in scoped_allocator_adaptor::construct 2020-03-23 09:08:05 -07:00
.clang-format
.gitignore [libcxx] Fix .gitignore to not exclude test directories 2020-03-25 17:52:23 -07:00
appveyor-reqs-install.cmd
appveyor.yml
CMakeLists.txt [libc++] Simplify the configuration of the C++ ABI library 2020-04-02 02:21:15 -04:00
CREDITS.TXT
LICENSE.TXT
NOTES.TXT
TODO.TXT