This is an archive of the discontinued LLVM Phabricator instance.

[lit] Extend internal diff to support -U
ClosedPublic

Authored by jdenny on Oct 8 2019, 3:02 PM.

Details

Summary

When using lit's internal shell, RUN lines like the following
accidentally execute an external diff instead of lit's internal
diff:

# RUN: program | diff -U1 file -

Such cases exist now, in clang/test/Analysis for example. We are
preparing patches to ensure lit's internal diff is called in such
cases, which will then fail because lit's internal diff doesn't
recognize -U as a command-line option. This patch adds -U
support.

Diff Detail

Event Timeline

jdenny created this revision.Oct 8 2019, 3:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2019, 3:02 PM
Herald added a subscriber: delcypher. · View Herald Transcript
rnk accepted this revision.Oct 8 2019, 3:35 PM

lgtm

This revision is now accepted and ready to land.Oct 8 2019, 3:35 PM
This revision was automatically updated to reflect the committed changes.
jdenny updated this revision to Diff 224870.Oct 14 2019, 9:34 AM

Rebased onto master so it doesn't depend on D66574 anymore. Thus, this now alters the original diff implementation within TestRunner.py instead of the diff.py that D66574 creates. This way, I don't have to apply the entire patch series at once, so handling bot failures should be easier.

It's basically the same patch, so another review shouldn't be necessary. I'll probably push later today.