diff options
author | pnihalani@chromium.org <pnihalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-04 17:11:52 +0000 |
---|---|---|
committer | pnihalani@chromium.org <pnihalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-04 17:11:52 +0000 |
commit | 0e8949526deeb30f20bf3fdaee1e010281f7504b (patch) | |
tree | 03f89cf65cf4cc06e5e352090e8bb3a8560cdd80 /native_client_sdk | |
parent | 35563e74279ad9eb5225cc5951632e6655a68d9e (diff) | |
download | chromium_src-0e8949526deeb30f20bf3fdaee1e010281f7504b.zip chromium_src-0e8949526deeb30f20bf3fdaee1e010281f7504b.tar.gz chromium_src-0e8949526deeb30f20bf3fdaee1e010281f7504b.tar.bz2 |
Added a test to launch local server and test nacl_sdk examples built by the build_sdk script in src/out dir.
Review URL: https://chromiumcodereview.appspot.com/10451098
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-x | native_client_sdk/src/build_tools/build_sdk.py | 10 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/buildbot_common.py | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index 11ba9e4..dbcfcc2 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -622,6 +622,16 @@ def main(args): buildbot_common.Run(['make', '-j8'], cwd=os.path.abspath(example_dir), shell=True) + # test examples. + 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. buildername = os.environ.get('BUILDBOT_BUILDERNAME', '') if options.archive or '-sdk' in buildername: diff --git a/native_client_sdk/src/build_tools/buildbot_common.py b/native_client_sdk/src/build_tools/buildbot_common.py index bdf0aea..e1e29dd 100644 --- a/native_client_sdk/src/build_tools/buildbot_common.py +++ b/native_client_sdk/src/build_tools/buildbot_common.py @@ -31,7 +31,7 @@ def BuildStep(name): sys.stdout.flush() -def Run(args, cwd=None, shell=False): +def Run(args, cwd=None, env=None, shell=False): """Start a process with the provided arguments. Starts a process in the provided directory given the provided arguments. If @@ -41,7 +41,7 @@ def Run(args, cwd=None, shell=False): print 'Running: ' + ' '.join(args) sys.stdout.flush() sys.stderr.flush() - subprocess.check_call(args, cwd=cwd, shell=shell) + subprocess.check_call(args, cwd=cwd, env=env, shell=shell) sys.stdout.flush() sys.stderr.flush() |