This is an archive of the discontinued LLVM Phabricator instance.

[Analyzer] Use diff_plist in tests, NFC
ClosedPublic

Authored by miyuki on Sep 13 2018, 7:53 AM.

Diff Detail

Event Timeline

miyuki created this revision.Sep 13 2018, 7:53 AM
NoQ added a comment.Sep 13 2018, 5:12 PM

What do you think about the following approach:

  1. Define a lit substitution %diff_plist that resolves to diff -u -w -I "<string>/" -I "<string>.:" -I "version" -.
  2. Update these flags in your downstream fork.

It's kinda cool because it'll allow us to test exactly what we want in the exact output that we normally expect ourselves to produce. Step 1 is a good thing to do anyway because it reduces duplication.

miyuki updated this revision to Diff 165469.Sep 14 2018, 3:58 AM
miyuki retitled this revision from [Analyzer] Make plist tests less fragile to [Analyzer] Use diff_plist in tests, NFC.
miyuki edited the summary of this revision. (Show Details)

Use a different approach (suggested by Artem).

Cool! Looks a lot cleaner.

Thanks!
A substitution would probably need to be defined in a different file though.

This revision is now accepted and ready to land.Sep 14 2018, 10:24 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.