This is an archive of the discontinued LLVM Phabricator instance.

[lit][gtest] Support SKIPPED tests
ClosedPublic

Authored by ikudrin on May 18 2021, 8:27 AM.

Details

Summary

This updates the googletest format to support tests that use GTEST_SKIP(), which is now available with the updated googletest framework.

Diff Detail

Event Timeline

ikudrin created this revision.May 18 2021, 8:27 AM
ikudrin requested review of this revision.May 18 2021, 8:27 AM

FWIW this looks reasonable to me, but I'm not a lit expert.

I am not really sure who can review this. If anyone knows the right person, please extend the list.

thopre added inline comments.May 20 2021, 2:01 AM
llvm/utils/lit/tests/googletest-format.py
25–27

Is this ordered guaranteed? If not, we should use CHECK-DAG.

ikudrin added inline comments.May 20 2021, 3:36 AM
llvm/utils/lit/tests/googletest-format.py
25–27

print_summary() in lit/main.py prints them in the exact order as ResultCodes are defined in lit/Test.py, so the sequence is stable.

thopre accepted this revision.May 20 2021, 4:47 AM

LGTM then

This revision is now accepted and ready to land.May 20 2021, 4:47 AM
delcypher added inline comments.May 20 2021, 10:23 PM
llvm/utils/lit/lit/formats/googletest.py
138

Looking for this exact string seems fragile. Maybe use a regex that can cope with a variable amount of spaces?

ikudrin added inline comments.May 20 2021, 10:47 PM
llvm/utils/lit/lit/formats/googletest.py
138

This corresponds to how the framework prints the summary, see PrettyUnitTestResultPrinter::OnTestIterationEnd(). If that is broken in some future release of the framework, we will fix the condition, but before that, we cannot predict in which way the report may be changed, so there is no need to overcomplicate the code.

This revision was automatically updated to reflect the committed changes.