This is an archive of the discontinued LLVM Phabricator instance.

[libc] Run all unit tests, irrespective of whether they belong to a test suite.
ClosedPublic

Authored by sivachandra on Apr 20 2023, 12:24 AM.

Details

Summary

Previously, only those unit tests which belonged to a suite were run as
part of libc-unit-tests. It meant that unit tests not part of any suite
were not being tested. This change makes all unit tests run as part of
libc-unit-tests. The convenience function to add a libc unit test suite
has been removed and add_custom_target is used in its place. One of the
bit-rotting test has along been fixed. Math exhaustive and differential
tests are skipped under full build.

Diff Detail

Event Timeline

sivachandra created this revision.Apr 20 2023, 12:24 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 20 2023, 12:24 AM
sivachandra requested review of this revision.Apr 20 2023, 12:24 AM
michaelrj added inline comments.Apr 20 2023, 11:54 AM
libc/test/src/math/CMakeLists.txt
1575

is there a better way to do this so that these tests can still be built under fullbuild, even if they aren't part of the default set?

sivachandra added inline comments.Apr 20 2023, 12:12 PM
libc/test/src/math/CMakeLists.txt
1575

The exhaustive tests (use MPFR) and differential tests (compare against the system libc) are built against the system libc/system libraries. So, we cannot build them cleanly in the full build mode wherein we assume no system libraries are available.

michaelrj accepted this revision.Apr 24 2023, 10:33 AM

LGTM

libc/test/src/math/CMakeLists.txt
1575

That makes sense.

This revision is now accepted and ready to land.Apr 24 2023, 10:33 AM

Add a few explicit casts which are required on a few bots.

This revision was landed with ongoing or failed builds.Apr 24 2023, 3:38 PM
This revision was automatically updated to reflect the committed changes.