author | Luke Bjerring <lukebjerring@users.noreply.github.com> |
Wed, 06 Jun 2018 16:38:34 +0000 | |
changeset 422212 | 3d7d065aa3e436d9078f2c93e213fa9947d2215d |
parent 422211 | 2f13ea4b0ff4a7fa8eef8b3281bf47ce59f73285 |
child 422213 | 8fa94bcb9b7c292ea9a48629b7224512d643ae8a |
push id | 34122 |
push user | ebalazs@mozilla.com |
push date | Mon, 11 Jun 2018 09:37:00 +0000 |
treeherder | mozilla-central@9941eb8c3b29 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | testonly |
bugs | 1452834, 10389, 10388 |
milestone | 62.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
testing/web-platform/tests/resources/test/wptserver.py | file | annotate | diff | comparison | revisions |
--- a/testing/web-platform/tests/resources/test/wptserver.py +++ b/testing/web-platform/tests/resources/test/wptserver.py @@ -1,8 +1,9 @@ +import logging import os import subprocess import time import sys import urllib2 class WPTServer(object): @@ -14,33 +15,37 @@ class WPTServer(object): self.host = config["browser_host"] self.http_port = config["ports"]["http"][0] self.https_port = config["ports"]["https"][0] self.base_url = 'http://%s:%s' % (self.host, self.http_port) self.https_base_url = 'https://%s:%s' % (self.host, self.https_port) def start(self): self.devnull = open(os.devnull, 'w') + wptserve_cmd = [os.path.join(self.wpt_root, 'wpt'), 'serve'] + logging.info('Executing %s' % ' '.join(wptserve_cmd)) self.proc = subprocess.Popen( - [os.path.join(self.wpt_root, 'wpt'), 'serve'], + wptserve_cmd, stderr=self.devnull, cwd=self.wpt_root) for retry in range(5): # Exponential backoff. time.sleep(2 ** retry) - if self.proc.poll() != None: + exit_code = self.proc.poll() + if exit_code != None: + logging.warn('Command "%s" exited with %s', ' '.join(wptserve_cmd), exit_code) break try: urllib2.urlopen(self.base_url, timeout=1) return except urllib2.URLError: pass - raise Exception('Could not start wptserve.') + raise Exception('Could not start wptserve on %s' % self.base_url) def stop(self): self.proc.terminate() self.proc.wait() self.devnull.close() def url(self, abs_path): return self.https_base_url + '/' + os.path.relpath(abs_path, self.wpt_root)