Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: grit/tool/build.py

Issue 576613002: Make it easier to parse the output assertion (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Break long line :/ Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/tool/build.py
diff --git a/grit/tool/build.py b/grit/tool/build.py
index 537e2c64d99e8c307e4b2e6eee511bd87f26627b..e72724f90b2411de7dd60b6751a52d133b6b2a6b 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698