diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 23:46:47 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 23:46:47 +0000 |
commit | c4374392252dd6f3c833426ca6121292951619fe (patch) | |
tree | ab61e0a902d140f45a37142f1e1c1e45c115c3eb /native_client_sdk/src | |
parent | 2aad2d843ebd38c8765bfd3699ab9ffb855bd4c6 (diff) | |
download | chromium_src-c4374392252dd6f3c833426ca6121292951619fe.zip chromium_src-c4374392252dd6f3c833426ca6121292951619fe.tar.gz chromium_src-c4374392252dd6f3c833426ca6121292951619fe.tar.bz2 |
[NaCl SDK] Add option to test_projects to build project first.
You can now pass -b to test_projects to build the projects you specify.
I've also removed the -p options for test_projects and build_projects. They've
been deprecated for a while, and I don't think anyone is using them anymore.
BUG=none
R=sbc@chromium.org
Review URL: https://codereview.chromium.org/105833005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src')
-rwxr-xr-x | native_client_sdk/src/build_tools/build_projects.py | 6 | ||||
-rwxr-xr-x | native_client_sdk/src/build_tools/test_projects.py | 27 |
2 files changed, 20 insertions, 13 deletions
diff --git a/native_client_sdk/src/build_tools/build_projects.py b/native_client_sdk/src/build_tools/build_projects.py index 7f8daa9..8ca133d 100755 --- a/native_client_sdk/src/build_tools/build_projects.py +++ b/native_client_sdk/src/build_tools/build_projects.py @@ -216,9 +216,6 @@ def main(argv): parser.add_option('-d', '--dest', help='Select which build destinations (project types) are valid.', action='append') - parser.add_option('-p', '--project', - help='Select which projects are valid.', - action='append') parser.add_option('-v', '--verbose', action='store_true') # To setup bash completion for this command first install optcomplete @@ -231,9 +228,6 @@ def main(argv): pass 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 diff --git a/native_client_sdk/src/build_tools/test_projects.py b/native_client_sdk/src/build_tools/test_projects.py index a97d740..d11a47f 100755 --- a/native_client_sdk/src/build_tools/test_projects.py +++ b/native_client_sdk/src/build_tools/test_projects.py @@ -9,8 +9,9 @@ import subprocess import sys import time -import buildbot_common +import build_projects import build_version +import buildbot_common import parse_dsc from build_paths import OUT_DIR, SRC_DIR, SDK_SRC_DIR, SCRIPT_DIR @@ -279,6 +280,19 @@ def RunAllTestsInTree(tree, toolchains, configs, retry_on_failure_times): return success +def BuildAllTestsInTree(tree, toolchains, configs): + for branch, desc in parse_dsc.GenerateProjects(tree): + desc_configs = desc.get('CONFIGS', ALL_CONFIGS) + valid_toolchains = set(toolchains) & set(desc['TOOLS']) + valid_configs = set(configs) & set(desc_configs) + for toolchain in sorted(valid_toolchains): + for config in sorted(valid_configs): + name = '%s/%s' % (branch, desc['NAME']) + build_projects.BuildProjectsBranch(pepperdir, name, deps=False, + clean=False, config=config, + args=['TOOLCHAIN=%s' % toolchain]) + + def GetProjectTree(include): # Everything in src is a library, and cannot be run. exclude = {'DEST': 'src'} @@ -302,17 +316,13 @@ def main(args): parser.add_option('-d', '--dest', help='Select which destinations (project types) are valid.', action='append') - parser.add_option('-p', '--project', - help='Select which projects are valid.', - action='append') + parser.add_option('-b', '--build', + help='Build each project before testing.', action='store_true') parser.add_option('--retry-times', help='Number of types to retry on failure (Default: %default)', type='int', default=1) options, args = parser.parse_args(args[1:]) - 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'] @@ -340,6 +350,9 @@ def main(args): options.config = ALL_CONFIGS project_tree = GetProjectTree(include) + if options.build: + BuildAllTestsInTree(project_tree, options.toolchain, options.config) + return RunAllTestsInTree(project_tree, options.toolchain, options.config, options.retry_times) |