Bug 199945 - [webkitpy] Allow the testrunner driver to setup the environment completely without needing to start the server process.
Summary: [webkitpy] Allow the testrunner driver to setup the environment completely wi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-19 08:52 PDT by Carlos Alberto Lopez Perez
Modified: 2019-07-22 07:25 PDT (History)
9 users (show)

See Also:


Attachments
Patch (7.55 KB, patch)
2019-07-19 09:11 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (2.27 KB, patch)
2019-07-22 07:10 PDT, Carlos Alberto Lopez Perez
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2019-07-19 08:52:19 PDT
Since bug 199855 the GTK and WPE testrunner drivers share more code with the base driver.

The scripts run-gtk-tests / run-wpe-tests, run-webdriver-tests and run-web-platform-tests need to setup the testrunner driver environment (to maybe start Xvfb or setup needed environment variables). But those scripts don't need the WebTestRunner server process running.

Previous to bug 199855 this scripts where setting only the environment variables that don't depend on the Driver tempdir (because this one is created when the driver is started), but starting the driver also executes the server process.

I think its desirable to refactor the code to allow creating the driver tempdir and setup the environment completely without needing to start the server process.
Comment 1 Carlos Alberto Lopez Perez 2019-07-19 09:11:31 PDT
Created attachment 374468 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2019-07-19 17:55:56 PDT
Comment on attachment 374468 [details]
Patch

Clearing flags on attachment: 374468

Committed r247663: <https://trac.webkit.org/changeset/247663>
Comment 3 Carlos Alberto Lopez Perez 2019-07-19 17:56:00 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-07-19 17:56:16 PDT
<rdar://problem/53332564>
Comment 5 Carlos Alberto Lopez Perez 2019-07-22 06:52:11 PDT
On further thinking, it seems to me that is also worth also adding an unit test for this.
Comment 6 Carlos Alberto Lopez Perez 2019-07-22 07:10:45 PDT
Created attachment 374597 [details]
Patch
Comment 7 Michael Catanzaro 2019-07-22 07:19:34 PDT
Comment on attachment 374597 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=374597&action=review

> Tools/Scripts/webkitpy/port/driver_unittest.py:396
> +                self.assertNotEqual(environ_driver[var], None)
> +
> +
>      def test_create_temporal_home_dir(self):

All the other surrounding functions have only one line between them (though I thought two was supposed to be standard for python).
Comment 8 Carlos Alberto Lopez Perez 2019-07-22 07:25:07 PDT
Committed r247682: <https://trac.webkit.org/changeset/247682>