This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Add support for generated tests in the libc++ test format
ClosedPublic

Authored by ldionne on May 23 2023, 1:57 PM.

Details

Summary

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.

Diff Detail

Event Timeline

ldionne created this revision.May 23 2023, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 1:57 PM
Herald added a subscriber: arichardson. · View Herald Transcript
ldionne requested review of this revision.May 23 2023, 1:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 1:57 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 525606.May 25 2023, 7:40 AM

Fix CI and rebase.

ldionne accepted this revision.May 25 2023, 2:17 PM
This revision is now accepted and ready to land.May 25 2023, 2:17 PM