This is an archive of the discontinued LLVM Phabricator instance.

[lit] Fail testing if a googletest executable crashes during test discovery
ClosedPublic

Authored by gparker42 on Aug 31 2016, 4:58 PM.

Details

Reviewers
ddunbar
Summary

googletest formatted tests are discovered by running the test executable. Previously testing would silently succeed if the test executable crashed during the discovery process. Now testing fails with "error: unable to discover google-tests ..." if the test executable exits with a non-zero status.

Diff Detail

Event Timeline

gparker42 updated this revision to Diff 69929.Aug 31 2016, 4:58 PM
gparker42 retitled this revision from to [lit] Fail testing if a googletest executable crashes during test discovery.
gparker42 updated this object.
gparker42 added a reviewer: ddunbar.
gparker42 added a subscriber: llvm-commits.
ddunbar edited edge metadata.Sep 1 2016, 7:34 PM

LGTM.

There might be clients of the capture() API which might aren't expecting it to throw on error, and will need to be updated, but I agree this makes more sense.

The only other use of capture() in lit itself is capturing sysctl -n hw.ncpu. I didn't look more broadly.

ddunbar accepted this revision.Sep 1 2016, 8:20 PM
ddunbar edited edge metadata.
This revision is now accepted and ready to land.Sep 1 2016, 8:20 PM
Eugene.Zelenko closed this revision.Oct 4 2016, 3:41 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL280455. Please specify "Differential revision: <URL>" in commit message.