This is an archive of the discontinued LLVM Phabricator instance.

[lit] Fix handling of various keyword parse errors
ClosedPublic

Authored by jdenny on Jun 11 2020, 8:31 AM.

Details

Summary

In TestRunner.py, D78589 extracts a _parseKeywords function from
parseIntegratedTestScript, which then expects _parseKeywords to
always return a list of keyword/value pairs. However, the extracted
code sometimes returns an unresolved lit.Test.Result on a keyword
parsing error, which then produces a stack dump instead of the
expected diagnostic.

This patch fixes that, makes the style of those diagnostics more
consistent, and extends the lit test suite to cover them.

Diff Detail

Event Timeline

jdenny created this revision.Jun 11 2020, 8:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2020, 8:31 AM
Herald added a subscriber: dexonsmith. · View Herald Transcript
ldionne accepted this revision.Jun 11 2020, 1:33 PM

Ah, nice catch. Thanks for fixing this.

This revision is now accepted and ready to land.Jun 11 2020, 1:33 PM

Thanks for the quick review.

This revision was automatically updated to reflect the committed changes.