Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1021926] mozlog: move the capture io class from web-platform/tests to mozlog (bug 1021926) #15880

Merged
merged 1 commit into from May 29, 2019

Conversation

moz-wptsync-bot
Copy link
Collaborator

The ability to capture the parent process' stdio is suggested to be a useful feature
to move from web-platform/tests into mozlog. To do so, I have created a new capture.py
file within mozlog/mozlog. This includes the CaptureIO class and its dependencies,
including the LoggingWrapper and LogThread classes. These have been removed from their
original location, to avoid duplication, and the files depending on them updated
accordingly.

It would be useful to add unittests testing the CaptureIO enter and exit methods, and
the original_stdio, logging_queue and logging_thread properties. I have begun such a
file with test_capture.py in mozlog/tests. This is a work in progress, however I may
need some guidance, please, in regards to creating appropriate mock data to assert.

Differential Revision: https://phabricator.services.mozilla.com/D22166

gecko-commit: f6705b8320496d0e67213299773e0c429f2b63ef
gecko-integration-branch: central
gecko-reviewers: jgraham

@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Mar 16, 2019
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@gsnedders
Copy link
Member

@jgraham what's the plan on landing this? wait till the next mozlog release?

@Hexcles Hexcles closed this Apr 26, 2019
@Hexcles Hexcles reopened this Apr 26, 2019
@nikk15
Copy link
Contributor

nikk15 commented May 5, 2019

It looks like the issue is that the capture.py created in mozlog is not recognised as a valid import. Could this be because the current mozlog requirement for WPT needs updating? I'm still new to the way WPT relates to Mozilla Central, so correct me if I'm wrong! @jgraham have I missed anything? Thanks!

@gsnedders
Copy link
Member

@nikk15 yeah, we need a new release of mozlog on PyPI before this can work, and then that should get updated here (through @pyup-bot).

@jgraham
Copy link
Contributor

jgraham commented May 7, 2019

@nikk15 if you want to bump the version number in testing/mozbase/mozlog/setup.py I'm very happy to review and do the actual release to PyPI.

@gsnedders
Copy link
Member

wptrunner/testrunner.py:10: in <module>
    from mozlog import structuredlog, capture
E   ImportError: cannot import name capture

Seems still be running with mozlog 4.0, despite #16994 landing?

…bug 1021926)

The ability to capture the parent process' stdio is suggested to be a useful feature
to move from web-platform/tests into mozlog. To do so, I have created a new capture.py
file within mozlog/mozlog. This includes the CaptureIO class and its dependencies,
including the LoggingWrapper and LogThread classes. These have been removed from their
original location, to avoid duplication, and the files depending on them updated
accordingly.

It would be useful to add unittests testing the CaptureIO enter and exit methods, and
the original_stdio, logging_queue and logging_thread properties. I have begun such a
file with test_capture.py in mozlog/tests. This is a work in progress, however I may
need some guidance, please, in regards to creating appropriate mock data to assert.

Differential Revision: https://phabricator.services.mozilla.com/D22166

gecko-commit: f6705b8320496d0e67213299773e0c429f2b63ef
gecko-integration-branch: central
gecko-reviewers: jgraham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra mozilla:gecko-sync wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants