Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: testing/scripts/run_locally_swarmed_webkit_layout_tests.py

Issue 2595793002: Run the webkit layout tests under swarming on linux_chromium_rel_ng. (Closed)
Patch Set: remove the webkit_layout_tests target and bump up the number of shards Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
mithro 2017/01/31 23:51:42 This is emulating what the recipes code should be
Dirk Pranke 2017/02/01 01:32:51 Correct. This is a transitional script that I was
2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import argparse
7 import json
8 import os
9 import shutil
10 import sys
11 import tempfile
12
13
14 import common
15
16 # Add src/testing/ into sys.path for importing xvfb.
17 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
18 import xvfb
19
20
21 def main_run(args):
22 os.chdir('src/out/Release')
qyearsley 2017/01/13 01:09:12 Note, this doesn't matter, but when running this s
23
24 rc = common.run_command([
25 sys.executable,
26 '../../tools/mb/mb.py',
27 'isolate',
28 '//out/Release',
29 'webkit_layout_tests_exparchive',
30 ])
31 if rc:
32 return rc
33
34 rc = common.run_command([
35 '../../tools/luci-go/linux64/isolate',
36 'exparchive',
37 '-verbose',
38 '-isolate=webkit_layout_tests_exparchive.isolate',
39 '-isolated=webkit_layout_tests_exparchive.isolated',
40 '-isolate-server=https://isolateserver.appspot.com',
41 ])
42 if rc:
43 return rc
44
45 blamelist = os.environ.get('BUILDBOT_BLAMELIST', [])
46 if (len(blamelist) == 1 and
47 os.environ.get('BUILDBOT_MASTERNAME').startswith('tryserver')):
48 user_args = ['--user', blamelist[0]]
49 else:
50 user_args = []
51
52 if isinstance(args.args, dict):
53 num_shards = args.args.get('shards', 1)
54 else:
55 num_shards = 1
56
57 try:
58 tmpdir = tempfile.mkdtemp('run_locally_swarmed_webkit_layout_tests_results',
59 dir='.')
60 rc = common.run_command([
61 sys.executable,
62 '../../tools/swarming_client/swarming.py',
63 'run',
64 '-v',
65 ] + user_args + [
66 '-d', 'pool', 'Chrome',
67 '-d', 'os', 'Ubuntu-12.04',
68 '-d', 'gpu', 'none',
69 '--swarming', 'https://chromium-swarm.appspot.com',
70 '--isolate-server', 'https://isolateserver.appspot.com',
71 '--shards', str(num_shards),
72 '--task-output-dir', tmpdir,
73 'webkit_layout_tests_exparchive.isolated',
74 '--',
75 '--isolated-script-test-output',
76 '${ISOLATED_OUTDIR}/output.json',
77 ])
78 finally:
79 # TODO: Merge the output and return real failures.
80 shutil.rmtree(tmpdir, ignore_errors=True)
81
82 json.dump({
83 'valid': True,
84 'failures': ['Failure'] if rc else [],
85 }, args.output)
86
87
88 def main_compile_targets(args):
89 json.dump(["locally_swarmed_webkit_layout_tests"], args.output)
90
91
92 if __name__ == '__main__':
93 funcs = {
94 'run': main_run,
95 'compile_targets': main_compile_targets,
96 }
97 sys.exit(common.run_script(sys.argv[1:], funcs))
OLDNEW
« testing/scripts/run_isolated_script_test.py ('K') | « testing/scripts/run_isolated_script_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698