Skip to content

Commit

Permalink
Merge r227268 - WebDriver: fix some nits that prevent running W3C tes…
Browse files Browse the repository at this point in the history
…ts on Mac

https://bugs.webkit.org/show_bug.cgi?id=181864

Reviewed by Carlos Garcia Campos.

* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.__init__): _wsout needs to always be defined,
as we assume that the property exists later.

(WebDriverW3CWebServer.stop): If the temporary file doesn't
exist for some reason, the remove call will raise and exception.
Gracefully handle the case where the file isn't created due to
a problem/exception that happened elsewhere.
  • Loading branch information
burg authored and carlosgcampos committed Jan 24, 2018
1 parent ffde8c8 commit 8296b78
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,19 @@
2018-01-20 Brian Burg <bburg@apple.com>

WebDriver: fix some nits that prevent running W3C tests on Mac
https://bugs.webkit.org/show_bug.cgi?id=181864

Reviewed by Carlos Garcia Campos.

* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.__init__): _wsout needs to always be defined,
as we assume that the property exists later.

(WebDriverW3CWebServer.stop): If the temporary file doesn't
exist for some reason, the remove call will raise and exception.
Gracefully handle the case where the file isn't created due to
a problem/exception that happened elsewhere.

2018-01-19 Carlos Garcia Campos <cgarcia@igalia.com>

WebDriver: driver environment not passed to pytest when running w3c tests
Expand Down
Expand Up @@ -43,6 +43,7 @@ def __init__(self, port):
self._layout_doc_root = os.path.join(layout_root, 'imported', 'w3c', 'web-platform-tests')
self._process = None
self._pid = None
self._wsout = None

tmpdir = tempfile.gettempdir()
if self._port.host.platform.is_mac():
Expand Down Expand Up @@ -114,7 +115,9 @@ def start(self):

def stop(self):
_log.debug('Cleaning WebDriver WPT server config.json')
self._port.host.filesystem.remove(os.path.join(self._layout_doc_root, 'config.json'))
temporary_config_file = os.path.join(self._layout_doc_root, 'config.json')
if self._port.host.filesystem.exists(temporary_config_file):
self._port.host.filesystem.remove(temporary_config_file)
if self._process:
self._process.communicate(input='\n')
if self._wsout:
Expand Down

0 comments on commit 8296b78

Please sign in to comment.