This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Transition all remaining generated tests to the new .gen format
ClosedPublic

Authored by ldionne on May 29 2023, 9:38 AM.

Details

Summary

In addition to reducing the amount of boilerplate we need to generate
whenever a new header is added, this also improves the existing tests
by running them in separate Lit tests (so they can be parallelized).
This also creates separate translation units for most header tests,
which is what we really should have done from the start since it
isolates each header we're testing.

Diff Detail

Event Timeline

ldionne created this revision.May 29 2023, 9:38 AM
ldionne requested review of this revision.May 29 2023, 9:38 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne updated this revision to Diff 526479.May 29 2023, 2:25 PM

Rebase to fix CI

philnik accepted this revision.May 29 2023, 2:31 PM
philnik added a subscriber: philnik.

LGTM with green CI.

libcxx/test/libcxx/clang_tidy.gen.py
19

Given that we will most likely need this in (almost) every gen test, maybe we want to just make this a utility variable for gen tests? IDK whether we want to add a few utility functions/variables like this, but will definitely need at least some variables anyways.

This revision is now accepted and ready to land.May 29 2023, 2:32 PM
ldionne marked an inline comment as done.May 29 2023, 2:37 PM
ldionne added inline comments.
libcxx/test/libcxx/clang_tidy.gen.py
19

I think this will eventually transition for XFAIL instead of #ifdef in the future now that we have one test per header, so I would wait until we make that change to see whether that's worth refactoring.

ldionne updated this revision to Diff 526608.May 30 2023, 7:39 AM
ldionne marked an inline comment as done.

Fix CI issues.

ldionne updated this revision to Diff 526628.May 30 2023, 8:07 AM

Poke CI to get accurate timings.

ldionne updated this revision to Diff 526783.May 30 2023, 2:00 PM

Add XFAIL on FreeBSD

Mordante accepted this revision.May 31 2023, 10:28 AM
Mordante added a subscriber: Mordante.

Did we add documentation for this new feature?
LGTM!

libcxx/include/__memory/allocator.h
101

Can this be landed separately?

ldionne marked an inline comment as done.May 31 2023, 12:21 PM

Did we add documentation for this new feature?
LGTM!

It is documented in format.py like we do for other types of tests.

libcxx/include/__memory/allocator.h
101

Sure, will do!

ldionne marked an inline comment as done.May 31 2023, 12:24 PM

Did we add documentation for this new feature?
LGTM!

It is documented in format.py like we do for other types of tests.

Thanks I overlooked that.

ldionne updated this revision to Diff 527189.May 31 2023, 1:36 PM

Drop changes to transitive_includes tests. Those are failing on Windows and I'll tackle them in a separate patch cause I want to land this and it's taking longer than expected.

ldionne updated this revision to Diff 527518.Jun 1 2023, 11:09 AM

Rebase after adding HIDE_FROM_ABI

ldionne updated this revision to Diff 527710.Jun 1 2023, 8:01 PM

Rebase onto main

ldionne updated this revision to Diff 527857.Jun 2 2023, 7:24 AM

Rebase onto transitive includes fix

libcxx/utils/CMakeLists.txt