-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Some Windows fixes #41
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds good to me. A second validation would be nice here, @olivernybroe @owenvoke ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok to me. Damn Windows support. sigh I've tested it locally on my Windows machine and most of the tests are successful. 👍
However, as per #37, the tests still aren't actually being executed here on Windows despite the CI passing. 👍
I'll have another look in the morning though.
Ok, I've re-tested on my proper Windows dev machine. The following tests seem to fail:
TestsPHPUnitCustomTestCaseInSubFoldersSubFolderSubFolderUsesPerSubDirectory
TestsPHPUnitCustomTestCaseUsesPerDirectory
TestsPluginsTraits
TestsVisualSingleTestOrDirectory
The first 3 tests fail due to not having the trait methods available, so I don't think uses()
is working as expected. 🤔
The visual tests fail with the following:
Failed asserting that '' contains " PASS Tests\Fixtures\DirectoryWithTests\ExampleTest
@Pierstoval, were all tests passing on your Windows machine? 🤔
@Pierstoval Can you rebase buddy? The fix of the build is now on the master. |
Yup, couple of tests on windows are failing. This is good sign. |
Locally, Pest tests work, but i have some that fail:
(sorry, output is not really easy to copy to github 😅 ) |
Yeah, I was trying to work those out earlier. 🤔 (#41 (review)) |
Some tests are related to the fact that |
Another issue is how test names are displayed in the output, I've got this issue after a fix:
As you can see, the test name should be I'm trying to search where this could be done... @nunomaduro, any idea? |
I made a few changes, it's still investigation more than bug fixes since I'm only testing this on Windows. (EDIT: At least, tests are executing in most Windows CI!) I'm totally unsure of 6fb3c79 since I don't know what's going to be the impact on Linux 🤔 but I was unsure about using By default, with
If I replace
There seem to be tons of things related to paths and root dir, I'm not sure where to search next🤔 |
(marked it as draft because it seems it's definitely NOT ready to be merged) |
@@ -152,15 +152,23 @@ public function build(TestSuite $testSuite): array | |||
*/ | |||
public function makeClassFromFilename(string $filename): string | |||
{ | |||
if ('\\' === DIRECTORY_SEPARATOR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only happen on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to just use PHP_OS_FAMILY === 'Windows'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this can happen only on Windows, that's a fairly common case 🙂
@Pierstoval Hey buddy, you are still working on this correct? Its fine if takes weeks, I just wanna make sure that there is no action on my side to be done. |
For now, I need to check why tests are failing, but I'm a bit busy these days :) |
No problem. Going to mark this issue as |
So, what exactly is here more required? Can you elaborate a little more? |
Sure, normally if you are on windows you can reproduce the problem running: |
@dimitrioskarvounaris The tests must be fully working on Windows, which is not the case now |
Continuing work under https://github.com/dimitrioskarvounaris/pest/tree/windows-gitbash |
@dimitrioskarvounaris feel free to make PRs on my fork to add your commits to this PR, I will accept them right away without review so they can be reviewed right here instead :) |
Felt it was too much trouble, to have one more fork (if that would even work at all, to make a fork from a fork, while having another fork of the original repo), and github wouldn't let me push to the same branch even on my fork, as I used the github-cli to clone the pull request. Github docs also said, I would need still push permissions on the other fork... sorry... so I just made a new PR here instead of going through all the trouble: #61 - it contains though all previous commits too. This way, I can use the extra time I would have lost trying that (and maybe still not working) in fixing the integration tests, instead. |
This is the branch that contains the windows work? If yes, can you close the other one @dimitrioskarvounaris? |
I've removed windows for now: e8d426f. Fell free to put it back. |
@nunomaduro Branch "windows-gitbash" contains Pierstoval's as also my fixes, not "windows". #61 fixes everything and the tests pass (I run them on windows as also linux). |
Closing in favour of #61. |
Is this some spam? |
Binary was using realpath, and targets were sanitized without taking the full path's drive name in account, so this was fixed.
I intend to wait for CI to make sure the test suite still works as expected.
I hope it'll fix #36 🤔