diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-08 22:58:18 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-08 22:58:18 +0000 |
commit | dcb797daf4fec6ec78d6536d4c946e8179d4edc7 (patch) | |
tree | c18a1a038534604aa7459f24cbd09829dcc6b328 /native_client_sdk | |
parent | 333bdf6026b851956d493b551440e22f1bae7d71 (diff) | |
download | chromium_src-dcb797daf4fec6ec78d6536d4c946e8179d4edc7.zip chromium_src-dcb797daf4fec6ec78d6536d4c946e8179d4edc7.tar.gz chromium_src-dcb797daf4fec6ec78d6536d4c946e8179d4edc7.tar.bz2 |
Revert 141281 - [NaCl SDK] Turn on pyauto testing on SDK builders (not trybots yet).
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10539015
TBR=binji@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10541089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-x | native_client_sdk/src/build_tools/build_sdk.py | 42 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/buildbot_common.py | 16 |
2 files changed, 15 insertions, 43 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index 94dfe6d..dbcfcc2 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -17,7 +17,6 @@ and whether it should upload an SDK to file storage (GSTORE) # std python includes -import copy import optparse import os import platform @@ -451,9 +450,6 @@ def main(args): action='store_true', dest='only_examples', default=False) parser.add_option('--update', help='Only build the updater.', action='store_true', dest='only_updater', default=False) - parser.add_option('--test-examples', - help='Run the pyauto tests for examples.', action='store_true', - dest='test_examples', default=False) parser.add_option('--skip-tar', help='Skip generating a tarball.', action='store_true', dest='skip_tar', default=False) parser.add_option('--archive', help='Force the archive step.', @@ -469,11 +465,6 @@ def main(args): if builder_name.find('pnacl') >= 0 and builder_name.find('sdk') >= 0: options.pnacl = True - # TODO(binji) for now, only test examples on non-trybots. Trybots don't build - # pyauto Chrome. - if buildbot_common.IsSDKBuilder(): - options.test_examples = True - if options.pnacl: toolchains = ['pnacl'] else: @@ -486,8 +477,6 @@ def main(args): skip_untar = skip skip_build = skip skip_test_updater = skip - skip_test_examples = skip or not options.test_examples - skip_test_build_tools = skip skip_tar = skip or options.skip_tar if options.archive and (options.only_examples or options.skip_tar): @@ -562,10 +551,9 @@ def main(args): 'pepper_' + pepper_ver], cwd=NACL_DIR) # Run build tests - if not skip_test_build_tools: - buildbot_common.BuildStep('Run build_tools tests') - buildbot_common.Run([sys.executable, - os.path.join(SDK_SRC_DIR, 'build_tools', 'tests', 'test_all.py')]) + buildbot_common.BuildStep('Run build_tools tests') + buildbot_common.Run([sys.executable, + os.path.join(SDK_SRC_DIR, 'build_tools', 'tests', 'test_all.py')]) # build sdk update if not skip_update: @@ -626,7 +614,7 @@ def main(args): # build examples. if not skip_examples: - buildbot_common.BuildStep('Build Examples') + buildbot_common.BuildStep('Test Build Examples') example_dir = os.path.join(pepperdir, 'examples') makefile = os.path.join(example_dir, 'Makefile') if os.path.isfile(makefile): @@ -635,18 +623,18 @@ def main(args): cwd=os.path.abspath(example_dir), shell=True) # test examples. - if not skip_examples and not skip_test_examples: - buildbot_common.BuildStep('Test Examples') - env = copy.copy(os.environ) - env['pepper_ver'] = pepper_ver - env['OUT_DIR'] = OUT_DIR - run_script_path = os.path.join(SRC_DIR, 'chrome', 'test', 'functional') - buildbot_common.Run([sys.executable, 'nacl_sdk.py', - 'nacl_sdk.NaClSDKTest.NaClSDKExamples'], cwd=run_script_path, - env=env) + skip_test_examples = True + if not skip_examples: + if not skip_test_examples: + run_script_path = os.path.join(SRC_DIR, 'chrome', 'test', 'functional') + buildbot_common.Run([sys.executable, 'nacl_sdk_example_test.py', + 'nacl_sdk_example_test.NaClSDKTest.testNaClSDK'], cwd=run_script_path, + env=dict(os.environ.items()+{'pepper_ver':pepper_ver, + 'OUT_DIR':OUT_DIR}.items())) # Archive on non-trybots. - if options.archive or buildbot_common.IsSDKBuilder(): + buildername = os.environ.get('BUILDBOT_BUILDERNAME', '') + if options.archive or '-sdk' in buildername: buildbot_common.BuildStep('Archive build') bucket_path = 'nativeclient-mirror/nacl/nacl_sdk/%s' % \ build_utils.ChromeVersion() @@ -654,7 +642,7 @@ def main(args): if not skip_update: # Only push up sdk_tools.tgz on the linux buildbot. - if builder_name == 'linux-sdk-multi': + if buildername == 'linux-sdk-multi': sdk_tools = os.path.join(OUT_DIR, 'sdk_tools.tgz') buildbot_common.Archive('sdk_tools.tgz', bucket_path, OUT_DIR, step_link=False) diff --git a/native_client_sdk/src/build_tools/buildbot_common.py b/native_client_sdk/src/build_tools/buildbot_common.py index 5275cd4..e1e29dd 100644 --- a/native_client_sdk/src/build_tools/buildbot_common.py +++ b/native_client_sdk/src/build_tools/buildbot_common.py @@ -18,22 +18,6 @@ sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) import oshelpers -def IsSDKBuilder(): - """Returns True if this script is running on an SDK builder. - - False means it is either running on a trybot, or a user's machine. - - Trybot names: - naclsdkm-((pnacl-)?linux|mac|windows(32|64)) - - Builder names: - (pnacl-)?(windows|mac|linux)-sdk-multi(rel)? - - except there are currently no pnacl multirel bots, and - pnacl-windows-sdk-multi is actually called pnacl-win-sdk-multi.""" - return '-sdk-multi' in os.getenv('BUILDBOT_BUILDERNAME', '') - - def ErrorExit(msg): """Write and error to stderr, then exit with 1 signaling failure.""" sys.stderr.write(msg + '\n') |