Bug 216879

Summary: REGRESSION(r267368) [webkitpy] autoinstalled pytest raises ImportError in run-webdriver-tests
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: Tools / TestsAssignee: Lauro Moura <lmoura>
Severity: Normal CC: aakash_jain, ews-watchlist, glenn, jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=215889
Description Flags
Patch none

Description Lauro Moura 2020-09-23 07:24:53 PDT
After r267368, run-webdriver-tests fails with the following trace:

Traceback (most recent call last):
  File "/app/webkit/Tools/Scripts/run-webdriver-tests", line 85, in <module>
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py", line 70, in run
    runner_tests = [runner.collect_tests(tests) for runner in self._runners]
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py", line 51, in collect_tests
    executor = WebDriverSeleniumExecutor(self._driver, self._env)
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py", line 57, in __init__
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py", line 35, in do_delayed_imports
    import webkitpy.webdriver_tests.pytest_runner as pytest_runner
  File "/app/webkit/Tools/Scripts/webkitpy/webdriver_tests/pytest_runner.py", line 32, in <module>
    import webkitpy.thirdparty.autoinstalled.pytest
  File "/app/webkit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/pytest.py", line 9, in <module>
    from _pytest.config import main, UsageError, cmdline, hookspec, hookimpl
  File "/app/webkit/Tools/Scripts/webkitpy/thirdparty/autoinstalled/_pytest/config/__init__.py", line 10, in <module>
    import py
ImportError: No module named py

Likely because WebDriver's pytest relied on mozlog/mozprocess calls to `self._ensure_autoinstalled_dir_is_in_sys_path()` to inject the autoinstalled path.
Comment 1 Lauro Moura 2020-09-23 07:35:49 PDT
Created attachment 409473 [details]
Comment 2 Jonathan Bedard 2020-09-23 08:28:49 PDT
Comment on attachment 409473 [details]

Sorry I broke this!
Comment 3 EWS 2020-09-23 08:57:17 PDT
Committed r267478: <https://trac.webkit.org/changeset/267478>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409473 [details].
Comment 4 Radar WebKit Bug Importer 2020-09-23 08:58:17 PDT