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

Fix: Make tests failing on Windows portable or skip them #4343

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

localheinz
Copy link
Collaborator

@localheinz localheinz commented Jun 29, 2020

This PR

  • skips two tests failing on window-latest
  • attempts to make a few tests failing on window-latest portable

Related to #4333.
Follows #4335.

@codecov
Copy link

codecov bot commented Jun 29, 2020

Codecov Report

Merging #4343 into 9.2 will increase coverage by 0.44%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                9.2    #4343      +/-   ##
============================================
+ Coverage     84.27%   84.71%   +0.44%     
- Complexity     4528     4529       +1     
============================================
  Files           218      218              
  Lines         11107    11791     +684     
============================================
+ Hits           9360     9989     +629     
- Misses         1747     1802      +55     
Impacted Files Coverage Δ Complexity Δ
src/Framework/SkippedTestCase.php 90.90% <0.00%> (-9.10%) 4.00% <0.00%> (ø%)
src/Framework/IncompleteTestCase.php 90.90% <0.00%> (-9.10%) 4.00% <0.00%> (ø%)
src/Runner/NullTestResultCache.php 66.66% <0.00%> (-8.34%) 6.00% <0.00%> (ø%)
src/TextUI/Configuration/Registry.php 83.33% <0.00%> (-6.67%) 6.00% <0.00%> (ø%)
src/Framework/MockObject/Stub/ReturnArgument.php 66.66% <0.00%> (-4.77%) 4.00% <0.00%> (ø%)
src/Framework/Constraint/JsonMatches.php 96.77% <0.00%> (-3.23%) 9.00% <0.00%> (ø%)
src/Util/TestDox/HtmlResultPrinter.php 92.00% <0.00%> (-2.74%) 8.00% <0.00%> (ø%)
src/Util/TestDox/ResultPrinter.php 57.14% <0.00%> (-1.48%) 39.00% <0.00%> (ø%)
src/Util/TestDox/TextResultPrinter.php 78.57% <0.00%> (-1.43%) 5.00% <0.00%> (ø%)
src/Util/Xml.php 84.74% <0.00%> (-0.73%) 52.00% <0.00%> (ø%)
... and 168 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d774ce...5250144. Read the comment docs.

@localheinz localheinz marked this pull request as draft June 29, 2020 13:40
@localheinz localheinz force-pushed the fix/windows branch 9 times, most recently from d65d928 to e237324 Compare June 30, 2020 07:04
@sebastianbergmann
Copy link
Owner

Please rebase against 9.2 so that f57379c is there. This hopefully solves the TypeError issue.

@sebastianbergmann sebastianbergmann added platform/windows Issues specific to the Windows platform type/build-automation Issues related to PHPUnit's build automation (GitHub Actions, etc.) labels Jun 30, 2020
@localheinz localheinz marked this pull request as ready for review June 30, 2020 13:57
@localheinz localheinz changed the title Fix: Skip tests on Windows Fix: Make tests failing on Windows portable or skip them Jun 30, 2020
@localheinz
Copy link
Collaborator Author

localheinz commented Jun 30, 2020

@sebastianbergmann

Tests fail with

PHP Warning:  file_get_contents(D:\a\phpunit\phpunit\tests\end-to-end\abstract-test-class.coverage): Failed to open stream: No such file or directory in D:\a\phpunit\phpunit\src\Runner\PhptTestCase.php on line 600
PHP Warning:  file_get_contents(D:\a\phpunit\phpunit\tests\end-to-end\assertion.coverage): Failed to open stream: No such file or directory in D:\a\phpunit\phpunit\src\Runner\PhptTestCase.php on line 600
PHP Warning:  file_get_contents(D:\a\phpunit\phpunit\tests\end-to-end\cli\bootstrap-not-found.coverage): Failed to open stream: No such file or directory in D:\a\phpunit\phpunit\src\Runner\PhptTestCase.php on line 600
...

following f57379c, see .

Should we check whether the files exist? Should they exist?

@localheinz
Copy link
Collaborator Author

@sebastianbergmann

I have fixed at least a few the tests failing on Windows - what do you think about merging this, and then we can take a look at the rest?

As far as I can see, the builds for

  • master
  • 9.2

are all failing for windows-latest at the moment.

@sebastianbergmann
Copy link
Owner

Errors: 4, Failures: 281 -- that's a lot.

@cmb69 Do you have an idea why so many tests fail with PHP 8 on Windows? Thanks!

@sebastianbergmann sebastianbergmann merged commit e6882c8 into sebastianbergmann:9.2 Jul 2, 2020
@cmb69
Copy link

cmb69 commented Jul 2, 2020

Enclosing the first argument to proc_open() in quotes is likely to cause issues, because this is now done by proc_open() (see php/php-src@9ca449e).

Form a quick look, it seems that several other (most?) test failures are caused by segfaults. :(

@localheinz localheinz deleted the fix/windows branch July 2, 2020 07:55
@localheinz
Copy link
Collaborator Author

Thank you, @cmb69 and @sebastianbergmann!

@sebastianbergmann
Copy link
Owner

Thank you, @cmb69. I took care of the proc_open() change in 9e3958d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/windows Issues specific to the Windows platform type/build-automation Issues related to PHPUnit's build automation (GitHub Actions, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants