Commit e9f339db authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[WPT export] More temporary logging to debug crash

The working theory is that the locale isn't correctly set in the
Python process. The interactive shell on the bot does have a UTF-8
locale, but the environment of the Python process could be different. To
verify this, we add some more logging to wpt-export.

This CL will be reverted once the issue is resolved.

Bug: 891831
Change-Id: Ice6478a2b4f3805f2a68b4e2b782f0f23e9aeb99
Reviewed-on: https://chromium-review.googlesource.com/c/1261974Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596782}
parent d385e20f
...@@ -94,11 +94,12 @@ class LocalWPT(object): ...@@ -94,11 +94,12 @@ class LocalWPT(object):
# Remove Chromium WPT directory prefix. # Remove Chromium WPT directory prefix.
patch = patch.replace(CHROMIUM_WPT_DIR, '') patch = patch.replace(CHROMIUM_WPT_DIR, '')
_log.info('Author: %s', author)
if '<' in author: if '<' in author:
author_str = author author_str = author
else: else:
author_str = '%s <%s>' % (author, author) author_str = '%s <%s>' % (author, author)
_log.info('Author: %s', repr(author_str))
_log.debug('Message:\n%s', repr(message))
# TODO(jeffcarp): Use git am -p<n> where n is len(CHROMIUM_WPT_DIR.split(/')) # TODO(jeffcarp): Use git am -p<n> where n is len(CHROMIUM_WPT_DIR.split(/'))
# or something not off-by-one. # or something not off-by-one.
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import argparse import argparse
import logging import logging
import sys
from blinkpy.common.system.log_utils import configure_logging from blinkpy.common.system.log_utils import configure_logging
from blinkpy.w3c.local_wpt import LocalWPT from blinkpy.w3c.local_wpt import LocalWPT
...@@ -57,6 +58,10 @@ class TestExporter(object): ...@@ -57,6 +58,10 @@ class TestExporter(object):
'your credentials up.') 'your credentials up.')
return False return False
# TODO(crbug.com/891831): temporary debug logging; remove afterwards.
_log.debug("LANG=%s", self.host.environ.get('LANG', ''))
_log.debug("filesystemencoding=%s", sys.getfilesystemencoding())
self.wpt_github = self.wpt_github or WPTGitHub(self.host, credentials['GH_USER'], credentials['GH_TOKEN']) self.wpt_github = self.wpt_github or WPTGitHub(self.host, credentials['GH_USER'], credentials['GH_TOKEN'])
self.gerrit = self.gerrit or GerritAPI(self.host, credentials['GERRIT_USER'], credentials['GERRIT_TOKEN']) self.gerrit = self.gerrit or GerritAPI(self.host, credentials['GERRIT_USER'], credentials['GERRIT_TOKEN'])
self.local_wpt = self.local_wpt or LocalWPT(self.host, credentials['GH_TOKEN']) self.local_wpt = self.local_wpt or LocalWPT(self.host, credentials['GH_TOKEN'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment