Fix PHPT coverage from phpdbg#3199
Merged
Merged
Conversation
Fixes #3111. Stop using auto_append_file as it doesn't work with the phpdbg sapi. Instead, the job's code is written to a temp file and the coverage instrumentation code takes over the code.
Codecov Report
@@ Coverage Diff @@
## 7.2 #3199 +/- ##
============================================
+ Coverage 81.41% 81.41% +<.01%
- Complexity 3388 3391 +3
============================================
Files 137 137
Lines 8974 8976 +2
============================================
+ Hits 7306 7308 +2
Misses 1668 1668
Continue to review full report at Codecov.
|
Fixes the following differences when running with phpdbg: * phpdbg doesn't ignore the -- argument separator when passed to php * phpdbg doesn't support display_errors=stderr, so errors go to STDOUT * Tests that enable xdebug.scream affect process isolation in phpdbg * Errors/Exceptions/Stacks are formatted slightly different in phpdbg
Also disables xdebug for phpdbg run
| script: | ||
| - ./phpunit --coverage-clover=coverage.xml | ||
| - phpenv config-rm xdebug.ini; true | ||
| - phpdbg -qrr ./phpunit --coverage-text |
Owner
There was a problem hiding this comment.
What is the point of running the tests once collecting code coverage data using Xdebug and once collecting code coverage data using PHPDBG?
Contributor
Author
There was a problem hiding this comment.
It was just the quickest way I came up with for testing the code coverage through phpdbg use case and ensuring all the tests passed through the sapi. I can certainly take it out if you think it doesn't provide any future value.
* Gets rid of the need for eval-stdin.php in phpdbg with the s option * Only include the args separator when a file is not given
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3111.
Stop using auto_append_file as it doesn't work with the phpdbg sapi.
Instead, the job's code is written to a temp file and the coverage instrumentation code takes over the code.