Skip to content

Make Environment Information Reporting Less Brittle #111

Description

@getsource

Environment information collection happens via a string replacement on https://github.com/WordPress/phpunit-test-runner/blob/master/prepare.php#L91.

This means that if the comments in wp-tests-config-sample.php are changed in core, environment reporting in the test runner breaks.
This ticket is a follow-up to when this happened in #105.

We should make this reporting less brittle so that it doesn't break when minor changes are made in core.

See #105 #109.

Activity

  1. getsource commented on Mar 6, 2020

    @getsource
    MemberAuthor

    As some added information here, it looks like the code to retrieve environment exists in both:
    https://github.com/WordPress/phpunit-test-runner/blob/master/prepare.php#L91
    and
    https://github.com/WordPress/phpunit-test-runner/blob/master/functions.php#L183

    It'd probably be a good idea to see if we can consolidate these two as a part of this issue.

  2. getsource commented on Mar 13, 2020

    @getsource
    MemberAuthor

    I'm not sure if this is the most elegant or not, but thinking about splitting it out into a file that can be either piped into SSH + run, and/or included (when the information is best gathered locally) would do the trick.

    I'm not sure if there was a reason for bundling it into wp-tests-config.php rather than running the env gathering PHP directly on the destination machine, but insight or recommendations are welcome.

  3. self-assigned this
    on Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions