Open bzbarsky opened 4 years ago
So the code is in resources/test/wptserver.py
:
logging.info('Executing %s' % ' '.join(wptserve_cmd))
self.proc = subprocess.Popen(
wptserve_cmd,
stderr=self.devnull,
cwd=self.wpt_root)
for retry in range(5):
# Exponential backoff.
time.sleep(2 ** retry)
exit_code = self.proc.poll()
if exit_code != None:
logging.warn('Command "%s" exited with %s', ' '.join(wptserve_cmd), exit_code)
break
try:
urllib.request.urlopen(self.base_url, timeout=1)
return
except urllib.error.URLError:
pass
raise Exception('Could not start wptserve on %s' % self.base_url)
So it currently explicitly sends stderr to /dev/null, probably because wpt serve
spews a lot of stuff when it runs.
I wonder if the correct fix might be to give wpt serve
a log-level flag, and then set it to ERROR/CRITICAL for this code. (Most of the spam from wpt serve
is DEBUG/INFO). Alternatively, we could capture stderr rather than pipe it to /dev/null, and then report it if the program fails to start.
It just says:
By contrast, running
wpt serve
directly gives:which has the right problem pointed out as well as a place to start fixing it.
Can we get the former to say something more like the latter, or at least not hide that error from the
wpt serve
it runs internally?@stephenmcgruer @jgraham