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

Make Environment Information Reporting Less Brittle #111

Open
getsource opened this issue Feb 27, 2020 · 2 comments
Open

Make Environment Information Reporting Less Brittle #111

getsource opened this issue Feb 27, 2020 · 2 comments

Comments

@getsource
Copy link
Member

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.

@getsource
Copy link
Member Author

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.

@getsource
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant