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

Side by Side Diff: sky/tools/test_perf

Issue 1150033006: Add support for Mac vs. Linux sky_server builds (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Update per jamesr's comments Created 5 years, 7 months 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
« no previous file with comments | « sky/tools/skypy/skyserver.py ('k') | sky/tools/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 from skypy.find_tests import find_tests 6 from skypy.find_tests import find_tests
7 from skypy.paths import Paths 7 from skypy.paths import Paths
8 import argparse 8 import argparse
9 import os 9 import os
10 import re 10 import re
11 import requests 11 import requests
12 import skypy.configuration as configuration 12 import skypy.configuration as configuration
13 import skypy.skyserver
13 import subprocess 14 import subprocess
14 15
15 16
16 SUPPORTED_MIME_TYPES = [ 17 SUPPORTED_MIME_TYPES = [
17 'text/html', 18 'text/html',
18 'text/sky', 19 'text/sky',
19 'text/plain', 20 'text/plain',
20 ] 21 ]
21 HTTP_PORT = 9999 22 HTTP_PORT = 9999
22 URL_ROOT = 'http://localhost:%s/' % HTTP_PORT 23 URL_ROOT = 'http://localhost:%s/' % HTTP_PORT
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 requests.post(DASHBOARD_URL, params={ 'data': json }) 63 requests.post(DASHBOARD_URL, params={ 'data': json })
63 64
64 65
65 class PerfHarness(object): 66 class PerfHarness(object):
66 def __init__(self, args): 67 def __init__(self, args):
67 self._sky_server = None 68 self._sky_server = None
68 self.paths = Paths(os.path.join('out', 'Debug')) 69 self.paths = Paths(os.path.join('out', 'Debug'))
69 self.args = args 70 self.args = args
70 71
71 def _start_server(self): 72 def _start_server(self):
72 subprocess.call(os.path.join(self.paths.sky_tools_directory, 73 # TODO(eseidel): Shouldn't this just use skyserver.py?
73 'download_sky_server'))
74 return subprocess.Popen([ 74 return subprocess.Popen([
75 os.path.join(self.paths.src_root, 'out', 'downloads', 'sky_server'), 75 SkyServer.sky_server_path(),
76 self.paths.src_root, 76 self.paths.src_root,
77 str(HTTP_PORT), 77 str(HTTP_PORT),
78 '-t', self.args.configuration 78 '-t', self.args.configuration
79 ]) 79 ])
80 80
81 def _sky_tester_command(self, url): 81 def _sky_tester_command(self, url):
82 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer') 82 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer')
83 for mime_type in SUPPORTED_MIME_TYPES] 83 for mime_type in SUPPORTED_MIME_TYPES]
84 return [ 84 return [
85 self.paths.mojo_shell_path, 85 self.paths.mojo_shell_path,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 try: 122 try:
123 harness.main() 123 harness.main()
124 except (KeyboardInterrupt, SystemExit): 124 except (KeyboardInterrupt, SystemExit):
125 pass 125 pass
126 finally: 126 finally:
127 harness.shutdown() 127 harness.shutdown()
128 128
129 129
130 if __name__ == '__main__': 130 if __name__ == '__main__':
131 main() 131 main()
OLDNEW
« no previous file with comments | « sky/tools/skypy/skyserver.py ('k') | sky/tools/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698