[all-commits] [llvm/llvm-project] f039ca: [libc++] Add support for generated tests in the li...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Thu May 25 14:18:04 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f039caec338300b794f0edf0ef10df49b297ec37
https://github.com/llvm/llvm-project/commit/f039caec338300b794f0edf0ef10df49b297ec37
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2023-05-25 (Thu, 25 May 2023)
Changed paths:
A libcxx/test/libcxx/selftest/gen.cpp/empty.gen.cpp
A libcxx/test/libcxx/selftest/gen.cpp/one.gen.cpp
A libcxx/test/libcxx/selftest/gen.cpp/two.gen.cpp
M libcxx/utils/libcxx/test/dsl.py
M libcxx/utils/libcxx/test/format.py
Log Message:
-----------
[libc++] Add support for generated tests in the libc++ test format
A recurring problem recently has been that libc++ has several generated
tests which all need to be re-generated before committing a change. This
creates noise during code reviews and friction for contributors.
Furthermore, the way we generated most of these tests resulted in
extremely bad compilation times when using modules, because we defined
a macro before compiling each file.
This commit introduces a new kind of test called a '.gen' test. These
tests are normal shell tests, however the Lit test format will run the
test to discover the actual Lit tests it should run. This basically
allows generating a Lit test suite on the fly using arbitrary code,
which can be used in the future to generate tests like our __verbose_abort
tests and several others.
Differential Revision: https://reviews.llvm.org/D151258
More information about the All-commits
mailing list