[libcxx-commits] [PATCH] D151258: [libc++] Add support for generated tests in the libc++ test format
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 23 13:57:02 PDT 2023
ldionne created this revision.
Herald added a subscriber: arichardson.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151258
Files:
libcxx/test/libcxx/selftest/gen.cpp/empty.gen.cpp
libcxx/test/libcxx/selftest/gen.cpp/one.gen.cpp
libcxx/test/libcxx/selftest/gen.cpp/two.gen.cpp
libcxx/utils/libcxx/test/format.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151258.524875.patch
Type: text/x-patch
Size: 7173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230523/aaf1fba2/attachment-0001.bin>
More information about the libcxx-commits
mailing list