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

Side by Side Diff: ppapi/PRESUBMIT.py

Issue 8460004: generator.py must accept M17 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix PRESUBMIT.py Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/generators/generator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import subprocess 7 import subprocess
8 8
9 def CheckChange(input_api, output_api): 9 def CheckChange(input_api, output_api):
10 results = [] 10 results = []
(...skipping 29 matching lines...) Expand all
40 results.append( 40 results.append(
41 output_api.PresubmitPromptWarning('Missing matching PPAPI definition:', 41 output_api.PresubmitPromptWarning('Missing matching PPAPI definition:',
42 long_text='\n'.join(missing))) 42 long_text='\n'.join(missing)))
43 43
44 # Verify all *.h files match *.idl definitions, use: 44 # Verify all *.h files match *.idl definitions, use:
45 # --test to prevent output to disk 45 # --test to prevent output to disk
46 # --diff to generate a unified diff 46 # --diff to generate a unified diff
47 # --out to pick which files to examine (only the ones in the CL) 47 # --out to pick which files to examine (only the ones in the CL)
48 ppapi_dir = input_api.PresubmitLocalPath() 48 ppapi_dir = input_api.PresubmitLocalPath()
49 cmd = [ sys.executable, 'generator.py', 49 cmd = [ sys.executable, 'generator.py',
50 '--wnone', '--diff', '--test','--cgen', '--range=M13,M16'] 50 '--wnone', '--diff', '--test','--cgen', '--range=M13,M17']
51 51
52 # Only generate output for IDL files references (as *.h or *.idl) in this CL 52 # Only generate output for IDL files references (as *.h or *.idl) in this CL
53 cmd.append('--out=' + ','.join([name + '.idl' for name in both])) 53 cmd.append('--out=' + ','.join([name + '.idl' for name in both]))
54 54
55 p = subprocess.Popen(cmd, cwd=os.path.join(ppapi_dir, 'generators'), 55 p = subprocess.Popen(cmd, cwd=os.path.join(ppapi_dir, 'generators'),
56 stdout=subprocess.PIPE, 56 stdout=subprocess.PIPE,
57 stderr=subprocess.PIPE) 57 stderr=subprocess.PIPE)
58 (p_stdout, p_stderr) = p.communicate() 58 (p_stdout, p_stderr) = p.communicate()
59 if p.returncode: 59 if p.returncode:
60 results.append( 60 results.append(
61 output_api.PresubmitError('PPAPI IDL Diff detected: Run the generator.', 61 output_api.PresubmitError('PPAPI IDL Diff detected: Run the generator.',
62 long_text=p_stderr)) 62 long_text=p_stderr))
63 return results 63 return results
64 64
65 def CheckChangeOnUpload(input_api, output_api): 65 def CheckChangeOnUpload(input_api, output_api):
66 # return [] 66 # return []
67 return CheckChange(input_api, output_api) 67 return CheckChange(input_api, output_api)
68 68
69 def CheckChangeOnCommit(input_api, output_api): 69 def CheckChangeOnCommit(input_api, output_api):
70 # return [] 70 # return []
71 return CheckChange(input_api, output_api) 71 return CheckChange(input_api, output_api)
72
OLDNEW
« no previous file with comments | « no previous file | ppapi/generators/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698