summaryrefslogtreecommitdiff
path: root/chromium/testing/scripts/common.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-08 10:28:10 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-03-20 13:40:30 +0000
commite733310db58160074f574c429d48f8308c0afe17 (patch)
treef8aef4b7e62a69928dbcf880620eece20f98c6df /chromium/testing/scripts/common.py
parent2f583e4aec1ae3a86fa047829c96b310dc12ecdf (diff)
downloadqtwebengine-chromium-e733310db58160074f574c429d48f8308c0afe17.tar.gz
BASELINE: Update Chromium to 56.0.2924.122
Change-Id: I4e04de8f47e47e501c46ed934c76a431c6337ced Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/testing/scripts/common.py')
-rw-r--r--chromium/testing/scripts/common.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/testing/scripts/common.py b/chromium/testing/scripts/common.py
index ee49a892692..f3407767f3d 100644
--- a/chromium/testing/scripts/common.py
+++ b/chromium/testing/scripts/common.py
@@ -70,6 +70,22 @@ def run_command(argv, env=None, cwd=None):
return rc
+def run_command_with_output(argv, env=None, cwd=None, stdoutfile=None):
+ print 'Running %r in %r (env: %r)' % (argv, cwd, env)
+ rc = 1
+ try:
+ output = subprocess.check_output(argv, env=env, cwd=cwd)
+ if stdoutfile:
+ with open(stdoutfile, 'w') as fp:
+ fp.write(output)
+ rc = 0
+ except Exception:
+ # Exit code remains 1 and we don't write output
+ pass
+ print 'Command %r returned exit code %d' % (argv, rc)
+ return rc
+
+
def run_runtest(cmd_args, runtest_args):
if cmd_args.use_src_side_runtest_py:
cmd = [