summaryrefslogtreecommitdiffstats
path: root/ppapi/generators
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-04 19:48:48 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-04 19:48:48 +0000
commita3aec3246afd1c1c42983f96e4c9a9283dceb151 (patch)
treedc9ced9519696f1652dfaa75eb19814e828c9289 /ppapi/generators
parentb17406480669e684467c9d1e76f26b063a3460e4 (diff)
downloadchromium_src-a3aec3246afd1c1c42983f96e4c9a9283dceb151.zip
chromium_src-a3aec3246afd1c1c42983f96e4c9a9283dceb151.tar.gz
chromium_src-a3aec3246afd1c1c42983f96e4c9a9283dceb151.tar.bz2
Allow defaults for generator which will check all available versions.
Change the default 'range' for the presubmit and generator to be start,end which represent the first and last Label found in the IDL. BUG= http://code.google.com/p/chromium/issues/detail?id=103037\ TRY= ./generate.py Review URL: http://codereview.chromium.org/8478005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108697 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators')
-rwxr-xr-xppapi/generators/generator.py2
-rw-r--r--ppapi/generators/idl_generator.py11
2 files changed, 11 insertions, 2 deletions
diff --git a/ppapi/generators/generator.py b/ppapi/generators/generator.py
index 00e85ac..a6065cd 100755
--- a/ppapi/generators/generator.py
+++ b/ppapi/generators/generator.py
@@ -26,7 +26,7 @@ if __name__ == '__main__':
# If no arguments are provided, assume we are tring to rebuild the
# C headers with warnings off.
- if not args: args = ['--wnone', '--cgen', '--range=M13,M16']
+ if not args: args = ['--wnone', '--cgen', '--range=start,end']
sys.exit(Main(args))
diff --git a/ppapi/generators/idl_generator.py b/ppapi/generators/idl_generator.py
index d438808..e6149ec 100644
--- a/ppapi/generators/idl_generator.py
+++ b/ppapi/generators/idl_generator.py
@@ -12,7 +12,7 @@ from idl_option import GetOption, Option, ParseOptions
GeneratorList = []
Option('release', 'Which release to generate.', default='')
-Option('range', 'Which ranges in the form of MIN,MAX.', default='M13,M16')
+Option('range', 'Which ranges in the form of MIN,MAX.', default='start,end')
#
@@ -66,6 +66,8 @@ class Generator(object):
rangestr = GetOption('range')
releasestr = GetOption('release')
+ print "Found releases: %s" % ast.releases
+
# Check for a range option which over-rides a release option
if not releasestr and rangestr:
range_list = rangestr.split(',')
@@ -75,6 +77,13 @@ class Generator(object):
else:
vmin = range_list[0]
vmax = range_list[1]
+
+ # Generate 'start' and 'end' represent first and last found.
+ if vmin == 'start':
+ vmin = ast.releases[0]
+ if vmax == 'end':
+ vmax = ast.releases[-1]
+
vmin = ast.releases.index(vmin)
vmax = ast.releases.index(vmax) + 1
range = ast.releases[vmin:vmax]