diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-19 04:12:42 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-19 04:12:42 +0000 |
commit | 3893bb4e46b2b6e39bc4fff46b776946124b295b (patch) | |
tree | a7f4ab23bba045493d611c52eee7a39944e3090d /native_client_sdk | |
parent | a8eadec71a576093bd6dbd155e7f8ac69496decf (diff) | |
download | chromium_src-3893bb4e46b2b6e39bc4fff46b776946124b295b.zip chromium_src-3893bb4e46b2b6e39bc4fff46b776946124b295b.tar.gz chromium_src-3893bb4e46b2b6e39bc4fff46b776946124b295b.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.
This change was originally landed at r240804, but was reverted speculatively.
See https://codereview.chromium.org/105833005/
BUG=none
TBR=sbc@chromium.org
Review URL: https://codereview.chromium.org/108573006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-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) |