diff options
author | thakis@chromium.org <thakis@chromium.org> | 2014-09-24 20:32:28 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org> | 2014-09-24 20:32:28 +0000 |
commit | 26b8eddb3579661bb2277c229ebc0ff9e07467b0 (patch) | |
tree | 392f8d02fa05ed4965ed67e02f1433be485a2d79 | |
parent | 740badd5e3e44434a9a47b5d16749daac1e8ea80 (diff) | |
download | grit-26b8eddb3579661bb2277c229ebc0ff9e07467b0.tar.gz |
Make it easier to parse the output assertion
Currently, when the list of outputs doesn't match the expected outputs,
grit just prints a big unreadable block of text. This change just makes
it much easier to parse that output and fix the offending expectations.
Review URL: https://codereview.chromium.org/576613002/
Patch from Chris Hopman <cjhopman@chromium.org>!
git-svn-id: http://grit-i18n.googlecode.com/svn/trunk@177 7262f16d-afe8-6277-6482-052fa10e57b1
-rw-r--r-- | grit/tool/build.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/grit/tool/build.py b/grit/tool/build.py index 537e2c6..e72724f 100644 --- a/grit/tool/build.py +++ b/grit/tool/build.py @@ -363,12 +363,21 @@ are exported to translation interchange files (e.g. XMB files), etc. for i in self.res.GetOutputFiles()]) if asserted != actual: - print '''Asserted file list does not match. - -Expected output files: %s - -Actual output files: %s -''' % (asserted, actual) + missing = list(set(actual) - set(asserted)) + extra = list(set(asserted) - set(actual)) + error = '''Asserted file list does not match. + +Expected output files: +%s +Actual output files: +%s +Missing output files: +%s +Extra output files: +%s +''' + print error % ('\n'.join(asserted), '\n'.join(actual), '\n'.join(missing), + '\n'.join(extra)) return False return True |