summaryrefslogtreecommitdiff
path: root/chromium/testing/scripts/common.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-14 11:38:45 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-14 17:16:47 +0000
commit3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (patch)
tree43cc572ba067417c7341db81f71ae7cc6e0fcc3e /chromium/testing/scripts/common.py
parentf61ab1ac7f855cd281809255c0aedbb1895e1823 (diff)
downloadqtwebengine-chromium-3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859.tar.gz
BASELINE: Update chromium to 45.0.2454.40
Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/testing/scripts/common.py')
-rw-r--r--chromium/testing/scripts/common.py34
1 files changed, 33 insertions, 1 deletions
diff --git a/chromium/testing/scripts/common.py b/chromium/testing/scripts/common.py
index 1aefcd5b795..3697c4b7373 100644
--- a/chromium/testing/scripts/common.py
+++ b/chromium/testing/scripts/common.py
@@ -37,6 +37,11 @@ def run_script(argv, funcs):
# behavior of the script.
parser.add_argument('--args', type=parse_json, default=[])
+ parser.add_argument(
+ '--use-src-side-runtest-py', action='store_true',
+ help='Use the src-side copy of runtest.py, as opposed to the build-side '
+ 'one')
+
subparsers = parser.add_subparsers()
run_parser = subparsers.add_parser('run')
@@ -62,12 +67,23 @@ def run_command(argv):
def run_runtest(cmd_args, runtest_args):
- return run_command([
+ if cmd_args.use_src_side_runtest_py:
+ cmd = [
+ sys.executable,
+ os.path.join(
+ cmd_args.paths['checkout'], 'infra', 'scripts', 'runtest_wrapper.py'),
+ '--path-build', cmd_args.paths['build'],
+ '--',
+ ]
+ else:
+ cmd = [
sys.executable,
os.path.join(cmd_args.paths['build'], 'scripts', 'tools', 'runit.py'),
'--show-path',
sys.executable,
os.path.join(cmd_args.paths['build'], 'scripts', 'slave', 'runtest.py'),
+ ]
+ return run_command(cmd + [
'--target', cmd_args.build_config_fs,
'--xvfb',
'--builder-name', cmd_args.properties['buildername'],
@@ -137,3 +153,19 @@ def parse_common_test_results(json_results, test_separator='/'):
results[key][test] = data
return results
+
+
+def parse_gtest_test_results(json_results):
+ failures = set()
+ for cur_iteration_data in json_results.get('per_iteration_data', []):
+ for test_fullname, results in cur_iteration_data.iteritems():
+ # Results is a list with one entry per test try. Last one is the final
+ # result, the only we care about here.
+ last_result = results[-1]
+
+ if last_result['status'] != 'SUCCESS':
+ failures.add(test_fullname)
+
+ return {
+ 'failures': sorted(failures),
+ }