summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorsbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 20:49:55 +0000
committersbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 20:49:55 +0000
commitb9606dd5e9ee36e922aff6a78fbd4958ea88c72b (patch)
tree558c1cf7cbce9c5ec2365fc0e898925f84456637 /native_client_sdk
parent821b8aec09289b1d78cd0930bf1da291d3b37984 (diff)
downloadchromium_src-b9606dd5e9ee36e922aff6a78fbd4958ea88c72b.zip
chromium_src-b9606dd5e9ee36e922aff6a78fbd4958ea88c72b.tar.gz
chromium_src-b9606dd5e9ee36e922aff6a78fbd4958ea88c72b.tar.bz2
[NaCl SDK] build_projects.py accepts args as well as options.
It makes sense to pass projects as args rather than options. This avoids having to specify many -p options, and args are not currently used for anything. Same applies for test_projects.py. e.g. ./build_projects.py -b nacl_io nacl_io_test vs ./build_proejcts.py -b -p nacl_io -p nacl_io_test R=binji@chromium.org Review URL: https://codereview.chromium.org/22299008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/build_tools/build_projects.py15
-rwxr-xr-xnative_client_sdk/src/build_tools/test_projects.py14
2 files changed, 17 insertions, 12 deletions
diff --git a/native_client_sdk/src/build_tools/build_projects.py b/native_client_sdk/src/build_tools/build_projects.py
index 20f3f7c..953b56f 100755
--- a/native_client_sdk/src/build_tools/build_projects.py
+++ b/native_client_sdk/src/build_tools/build_projects.py
@@ -204,7 +204,7 @@ def BuildProjects(pepperdir, project_tree, deps=True,
BuildProjectsBranch(pepperdir, branch, deps, clean, config)
-def main(args):
+def main(argv):
parser = optparse.OptionParser()
parser.add_option('-c', '--clobber',
help='Clobber project directories before copying new files',
@@ -227,9 +227,10 @@ def main(args):
action='append')
parser.add_option('-v', '--verbose', action='store_true')
- options, args = parser.parse_args(args[1:])
- if args:
- parser.error('Not expecting any arguments.')
+ options, args = parser.parse_args(argv[1:])
+ if options.project:
+ parser.error('The -p/--project option is deprecated.\n'
+ 'Just use positional paramaters instead.')
if 'NACL_SDK_ROOT' in os.environ:
# We don't want the currently configured NACL_SDK_ROOT to have any effect
@@ -258,9 +259,9 @@ def main(args):
if options.dest:
filters['DEST'] = options.dest
print 'Filter by type: ' + str(options.dest)
- if options.project:
- filters['NAME'] = options.project
- print 'Filter by name: ' + str(options.project)
+ if args:
+ filters['NAME'] = args
+ print 'Filter by name: ' + str(args)
try:
project_tree = parse_dsc.LoadProjectTree(SDK_SRC_DIR, include=filters)
diff --git a/native_client_sdk/src/build_tools/test_projects.py b/native_client_sdk/src/build_tools/test_projects.py
index 25b84b5..3d298c7 100755
--- a/native_client_sdk/src/build_tools/test_projects.py
+++ b/native_client_sdk/src/build_tools/test_projects.py
@@ -85,6 +85,9 @@ def GetExecutableDirForProject(desc, toolchain, config):
def GetBrowserTesterCommand(desc, toolchain, config):
+ if browser_path is None:
+ buildbot_common.ErrorExit('Failed to find chrome browser using FindChrome.')
+
args = [
sys.executable,
browser_tester_py,
@@ -297,8 +300,9 @@ def main(args):
type='int', default=1)
options, args = parser.parse_args(args[1:])
- if args:
- parser.error('Not expecting any arguments.')
+ if options.project:
+ parser.error('The -p/--project option is deprecated.\n'
+ 'Just use positional paramaters instead.')
if not options.toolchain:
options.toolchain = ['newlib', 'glibc', 'pnacl', 'host']
@@ -319,9 +323,9 @@ def main(args):
if options.dest:
include['DEST'] = options.dest
print 'Filter by type: ' + str(options.dest)
- if options.project:
- include['NAME'] = options.project
- print 'Filter by name: ' + str(options.project)
+ if args:
+ include['NAME'] = args
+ print 'Filter by name: ' + str(args)
if not options.config:
options.config = ALL_CONFIGS