WebDriver: add timeout option to run-webdriver-tests script
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2017 12:45:30 +0000 (12:45 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Nov 2017 12:45:30 +0000 (12:45 +0000)
commitf98576d70868b9fb45b44f495a249c2ef704fb54
tree61b5bc7aa2cc6d9172b608b1158fa5b284b63d8c
parentfb4e641dc23f45b460a3b3fcf28197acfac8efe4
WebDriver: add timeout option to run-webdriver-tests script
https://bugs.webkit.org/show_bug.cgi?id=179940

Reviewed by Carlos Alberto Lopez Perez.

Tools:

We need to handle timeouts to be able to run the tests in the bots. pytest doesn't support timeouts, but there's
a plugin pytest_timeout that can be used for that.

* Scripts/run-webdriver-tests: Add --timeout command line option.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module): Check if pytest_timeout is imported to install it.
(AutoinstallImportHook._install_pytest_timeout): Install pytest_timeout from pypi.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
(WebDriverTestRunnerW3C.__init__): Set PYTEST_TIMEOUT env var with the timeout given.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.run): Clarify that the timeout received by do_wdspec() is ignored, and pass 0 instead of 25.

WebDriverTests:

Add a base conftest.py to load pytest_timeout plugin.

* imported/w3c/conftest.py: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/run-webdriver-tests
Tools/Scripts/webkitpy/thirdparty/__init__.py
Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py
Tools/Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py
WebDriverTests/ChangeLog
WebDriverTests/imported/w3c/conftest.py [new file with mode: 0644]