OLD | NEW |
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 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 requests.post(DASHBOARD_URL, params={ 'data': json }) | 62 requests.post(DASHBOARD_URL, params={ 'data': json }) |
63 | 63 |
64 | 64 |
65 class PerfHarness(object): | 65 class PerfHarness(object): |
66 def __init__(self, args): | 66 def __init__(self, args): |
67 self._sky_server = None | 67 self._sky_server = None |
68 self.paths = Paths(os.path.join('out', 'Debug')) | 68 self.paths = Paths(os.path.join('out', 'Debug')) |
69 self.args = args | 69 self.args = args |
70 | 70 |
71 def _start_server(self): | 71 def _start_server(self): |
| 72 subprocess.call(os.path.join(self.paths.sky_tools_directory, |
| 73 'download_sky_server')) |
72 return subprocess.Popen([ | 74 return subprocess.Popen([ |
73 os.path.join(self.paths.sky_tools_directory, 'sky_server'), | 75 os.path.join(self.paths.src_root, 'out', 'downloads', 'sky_server'), |
74 self.paths.src_root, | 76 self.paths.src_root, |
75 str(HTTP_PORT), | 77 str(HTTP_PORT), |
76 '-t', self.args.configuration | 78 '-t', self.args.configuration |
77 ]) | 79 ]) |
78 | 80 |
79 def _sky_tester_command(self, url): | 81 def _sky_tester_command(self, url): |
80 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer') | 82 content_handlers = ['%s,%s' % (mime_type, 'mojo:sky_viewer') |
81 for mime_type in SUPPORTED_MIME_TYPES] | 83 for mime_type in SUPPORTED_MIME_TYPES] |
82 return [ | 84 return [ |
83 self.paths.mojo_shell_path, | 85 self.paths.mojo_shell_path, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 try: | 122 try: |
121 harness.main() | 123 harness.main() |
122 except (KeyboardInterrupt, SystemExit): | 124 except (KeyboardInterrupt, SystemExit): |
123 pass | 125 pass |
124 finally: | 126 finally: |
125 harness.shutdown() | 127 harness.shutdown() |
126 | 128 |
127 | 129 |
128 if __name__ == '__main__': | 130 if __name__ == '__main__': |
129 main() | 131 main() |
OLD | NEW |