This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add 'UNIT_TEST_ONLY' and 'HERMETIC_TEST_ONLY' to 'add_libc_test'
ClosedPublic

Authored by jhuber6 on May 2 2023, 1:57 PM.

Details

Summary

The add_libc_test option allows us to enable both kinds of tests in a
single option. However, some tests cannot be made hermetic with the
current approach. Such as tests that rely on system utilities or
libraries. This patch adds two options UNIT_TEST_ONLY and
HERMETIC_TEST_ONLY to offer more fine-grained control over which
version gets built. This makes it explicit which version a test supports
and why.

Depends on D149662

Diff Detail

Event Timeline

jhuber6 created this revision.May 2 2023, 1:57 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 2 2023, 1:57 PM
jhuber6 requested review of this revision.May 2 2023, 1:57 PM
sivachandra accepted this revision.May 2 2023, 2:06 PM
sivachandra added inline comments.
libc/test/src/string/memory_utils/CMakeLists.txt
1–2

Nit: "... to enable a hermetic test also."

18

Nit: Move it right after the test name below line #3.

This revision is now accepted and ready to land.May 2 2023, 2:06 PM