diff options
author | msw <msw@chromium.org> | 2015-07-15 16:10:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-15 23:11:45 +0000 |
commit | b54a5f9c00f35a6644985f6b0b45d73f4b5b7dd5 (patch) | |
tree | 60b1b6b7a5e913ad3f73de926378d750f2b92e18 /mojo/tools/rev_sdk.py | |
parent | 1fc27722fcfed8dc4b8e6e1c98062d50de36e2a1 (diff) | |
download | chromium_src-b54a5f9c00f35a6644985f6b0b45d73f4b5b7dd5.zip chromium_src-b54a5f9c00f35a6644985f6b0b45d73f4b5b7dd5.tar.gz chromium_src-b54a5f9c00f35a6644985f6b0b45d73f4b5b7dd5.tar.bz2 |
Get output from hung mojo apptests.
Depends on https://codereview.chromium.org/1239563003
Start Xvfb and Openbox separately from the test process.
This lets us get output from killed hung test processes.
(wrapping the commandline with xvfb.py prevents this)
Remove xvfb from Paths objects. Use more single quotes.
TODO: Use test_env.run_executable() or its env vars?
BUG=493535,504917
TEST=Apptests killed for timeouts yield output.
R=maruel@chromium.org
TBR=ben@chromium.org,sky@chromium.org
Review URL: https://codereview.chromium.org/1230683002
Cr-Commit-Position: refs/heads/master@{#338943}
Diffstat (limited to 'mojo/tools/rev_sdk.py')
-rwxr-xr-x | mojo/tools/rev_sdk.py | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/mojo/tools/rev_sdk.py b/mojo/tools/rev_sdk.py index db81034..d3d14c7 100755 --- a/mojo/tools/rev_sdk.py +++ b/mojo/tools/rev_sdk.py @@ -3,9 +3,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Tool to roll Mojo into Chromium. See: +'''Tool to roll Mojo into Chromium. See: https://github.com/domokit/mojo/wiki/Rolling-code-between-chromium-and-mojo#mojo---chromium-updates-sdk--edk -""" +''' import os import sys @@ -13,28 +13,28 @@ from utils import commit from utils import chromium_root_dir from utils import system -sdk_prefix_in_chromium = "third_party/mojo/src" +sdk_prefix_in_chromium = 'third_party/mojo/src' sdk_dirs_to_clone = [ - "mojo/edk", - "mojo/public", - "nacl_bindings", + 'mojo/edk', + 'mojo/public', + 'nacl_bindings', ] sdk_dirs_to_not_clone = [ - "mojo/public/cpp/application", - "mojo/public/interfaces/application", - "mojo/public/interfaces/network", - "mojo/public/java/application", + 'mojo/public/cpp/application', + 'mojo/public/interfaces/application', + 'mojo/public/interfaces/network', + 'mojo/public/java/application', ] # Individual files to preserve within the target repository during roll. These # are relative to |sdk_prefix_in_chromium| but are not maintained in the mojo # repository. preserved_chromium_files = [ - "mojo/edk/DEPS", - "mojo/public/DEPS", - "mojo/public/platform/nacl/DEPS", - "nacl_bindings/DEPS", + 'mojo/edk/DEPS', + 'mojo/public/DEPS', + 'mojo/public/platform/nacl/DEPS', + 'nacl_bindings/DEPS', ] # A dictionary mapping dirs to clone to their destination locations in Chromium. @@ -45,19 +45,19 @@ for sdk_dir in sdk_dirs_to_clone: dirs_to_clone[sdk_dir] = sdk_dir_in_chromium def rev(source_dir, chromium_dir, mojo_revision): - src_commit = system(["git", "rev-parse", mojo_revision], + src_commit = system(['git', 'rev-parse', mojo_revision], cwd=source_dir).strip() for input_dir, dest_dir in dirs_to_clone.iteritems(): if os.path.exists(os.path.join(chromium_dir, dest_dir)): - print "removing directory %s" % dest_dir - system(["git", "rm", "-r", dest_dir], cwd=chromium_dir) - print "cloning directory %s into %s" % (input_dir, dest_dir) - files = system(["git", "ls-files", input_dir], cwd=source_dir) + print 'removing directory %s' % dest_dir + system(['git', 'rm', '-r', dest_dir], cwd=chromium_dir) + print 'cloning directory %s into %s' % (input_dir, dest_dir) + files = system(['git', 'ls-files', input_dir], cwd=source_dir) for f in files.splitlines(): # Don't copy presubmit files over since the code is read-only on the # chromium side. - if os.path.basename(f) == "PRESUBMIT.py": + if os.path.basename(f) == 'PRESUBMIT.py': continue exclude = False @@ -72,27 +72,27 @@ def rev(source_dir, chromium_dir, mojo_revision): # |input_dir|. f_relpath = os.path.relpath(f, input_dir) dest_path = os.path.join(chromium_dir, dest_dir, f_relpath) - system(["mkdir", "-p", os.path.dirname(dest_path)]) - system(["cp", os.path.join(source_dir, f), dest_path]) + system(['mkdir', '-p', os.path.dirname(dest_path)]) + system(['cp', os.path.join(source_dir, f), dest_path]) os.chdir(chromium_dir) - system(["git", "add", dest_dir], cwd=chromium_dir) + system(['git', 'add', dest_dir], cwd=chromium_dir) - mojo_public_dest_dir = os.path.join(sdk_prefix_in_chromium, "mojo/public") - version_filename = os.path.join(mojo_public_dest_dir, "VERSION") - with open(version_filename, "w") as version_file: + mojo_public_dest_dir = os.path.join(sdk_prefix_in_chromium, 'mojo/public') + version_filename = os.path.join(mojo_public_dest_dir, 'VERSION') + with open(version_filename, 'w') as version_file: version_file.write(src_commit) - system(["git", "add", version_filename], cwd=chromium_dir) + system(['git', 'add', version_filename], cwd=chromium_dir) # Reset preserved files that were blown away. for rel_path in preserved_chromium_files: preserved_path = os.path.join(sdk_prefix_in_chromium, rel_path) - system(["git", "reset", "--", preserved_path]) - system(["git", "checkout", preserved_path]) + system(['git', 'reset', '--', preserved_path]) + system(['git', 'checkout', preserved_path]) - commit("Update mojo sdk to rev " + src_commit, cwd=chromium_dir) + commit('Update mojo sdk to rev ' + src_commit, cwd=chromium_dir) if len(sys.argv) < 2: - print "usage: rev_sdk.py <mojo source dir> [<mojo revision>]" + print 'usage: rev_sdk.py <mojo source dir> [<mojo revision>]' sys.exit(1) # Allow override of the roll revision. |