diff options
author | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 16:55:09 +0000 |
---|---|---|
committer | noelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-14 16:55:09 +0000 |
commit | 39375788c550e675967f4571730136374f134a7e (patch) | |
tree | 6cf62d6b7069c245aa59b42cb11dd938156afcff /ppapi/generators | |
parent | e66b721642dabbf698873468c9e2fa36ba830e87 (diff) | |
download | chromium_src-39375788c550e675967f4571730136374f134a7e.zip chromium_src-39375788c550e675967f4571730136374f134a7e.tar.gz chromium_src-39375788c550e675967f4571730136374f134a7e.tar.bz2 |
Add presubmit check to verify PPAPI C headers match IDL files.
Update outfile to print a better filename on diff.
Update fix missing 'name' in idl_generator.py
BUG= http://code.google.com/p/chromium/issues/detail?id=93534
TEST= gcl upload | presubmit (after modifying a .h or .idl file)
R= brettw@chromium.org
Review URL: http://codereview.chromium.org/7700001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators')
-rw-r--r-- | ppapi/generators/idl_generator.py | 2 | ||||
-rw-r--r-- | ppapi/generators/idl_outfile.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ppapi/generators/idl_generator.py b/ppapi/generators/idl_generator.py index e66efc1..bd77e07 100644 --- a/ppapi/generators/idl_generator.py +++ b/ppapi/generators/idl_generator.py @@ -146,7 +146,7 @@ class GeneratorByFile(Generator): cnt = 0 for filenode in ast.GetListOf('File'): # Skip this file if not required - if outlist and name not in outlist: + if outlist and filenode.GetName() not in outlist: continue # If this file has errors, skip it diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py index ae8da4e..434cfa0 100644 --- a/ppapi/generators/idl_outfile.py +++ b/ppapi/generators/idl_outfile.py @@ -92,7 +92,9 @@ class IDLOutFile(object): if GetOption('diff'): for line in difflib.unified_diff(intext.split('\n'), outtext.split('\n'), - self.filename, 'NEW', n=1, lineterm=''): + 'OLD ' + self.filename, + 'NEW ' + self.filename, + n=1, lineterm=''): ErrOut.Log(line) try: |