Page MenuHomePhabricator

[libc][NFC] add macro for fuchsia to switch test backend to zxtest

Authored by michaelrj on Jan 13 2021, 11:41 AM.



This moves utils/UnitTest/Test.[h/cpp] to LibcTest.[h/cpp] and adds a
new Test.h that acts as a switcher so that Fuchsia can use the zxtest
backend for running our tests as part of their build.

FuchsiaTest.h is for including fuchsia's zxtest library and anything
else needed to make the tests work under fuchsia (currently just
undefining the isascii macro for the test).

Downstream users, please fix your build instead of reverting.

Diff Detail

Event Timeline

michaelrj created this revision.Jan 13 2021, 11:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2021, 11:41 AM
michaelrj requested review of this revision.Jan 13 2021, 11:41 AM

add headerguards to the new Test.h and FuchsiaTest.h

sivachandra added inline comments.Jan 13 2021, 12:06 PM

I think this description is incorrect.


Can you add comments here explaining why you need these?


As the clang-tidy warning is saying, I think we should make it:


Same for other header files as well. It wasn't correct to begin with, so lets fix them as we are touching them.

michaelrj marked 3 inline comments as done.

fix the headerguards and add a comment explaining the undef in FuchsiaTest.h


oops, forgot to change that when copy/pasting

michaelrj updated this revision to Diff 316500.Jan 13 2021, 1:04 PM

fixed phrasing in comment

sivachandra accepted this revision.Jan 13 2021, 1:10 PM
This revision is now accepted and ready to land.Jan 13 2021, 1:10 PM
michaelrj updated this revision to Diff 316503.Jan 13 2021, 1:26 PM

fix phrasing in commit message

michaelrj edited the summary of this revision. (Show Details)Jan 13 2021, 1:26 PM
This revision was landed with ongoing or failed builds.Jan 13 2021, 1:28 PM
This revision was automatically updated to reflect the committed changes.