llvm-capstone/libcxx/utils
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
..
ci [libc++][macOS CI] Ensure that the SDK version is not older than the deployment target 2020-02-11 13:52:41 +01:00
docker Revert "[libc++] Run the builders Docker containers 'as 'buildbot instead of 'root'" 2020-03-26 08:08:01 -04:00
gdb/libcxx Correctly handle using foo = std::foo inside namespaces. 2020-03-26 11:20:09 -07:00
google-benchmark
libcxx [libc++] Add an alternative Lit test format 2020-04-03 11:35:27 -04:00
symcheck-blacklists
cat_files.py
generate_feature_test_macro_components.py [libc++] [P0646] Add feature-test macro for __cpp_lib_list_remove_return_type. 2020-03-12 11:06:49 +01:00
graph_header_deps.py [libc++] Add utility to generate and display libc++'s header dependency 2020-02-15 18:47:17 -05:00
merge_archives.py [libcxx] Drop -D option from libtool when merging archives 2020-03-02 16:07:18 -08:00
not.py
run.py [libc++] Execute tests from the Lit execution root instead of the test tree 2020-04-01 22:17:03 -04:00
ssh.py [libc++] SSH: Create a tarball of dependencies and scp that instead 2020-04-01 16:38:21 -04:00
sym_diff.py
sym_extract.py
sym_match.py