-
Notifications
You must be signed in to change notification settings - Fork 476
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 the tests work under Windows #943
Conversation
This looks good to me. Actually, i had to implement some very small portions of it in order to implement and run on Windows the testcases for the new compiler I would like to add support for (#942). If, by chance, your patch gets merged soon I would rebase my own patch. thanks |
5e61de3
to
473f583
Compare
Note that the Windows tests are work in progress and have never worked before, so it's not the case that they have become broken. |
I thought that because there were many My initial motivation for this change was: I started to fix the basedir functionality for Windows, because it doesn't really work with all the Windows path mess. I didn't fix all tests, because in some cases ccache really doesn't work on Windows or the effort to get it running in the git-bash was too high. And I don't expect to fix all bugs for ccache under Windows, but only that no additional bugs get in by mistakes. |
473f583
to
9239fce
Compare
I added the commit 'handle newlines on Windows properly' from #954. With this I was able to remove some hacks. I did not add the commit 'handle properly also stdout in addition to stderr' because it breaks the correct ccache behavior. |
9239fce
to
1125d8c
Compare
- Adding the ".sh" extension to most shell scripts. It looks like Windows needs this to run the scripts. - Adding special handling of carriage return characters. - Tests that fail are deactivated for the moment.
… and 'Basic auth failed'.
9808365
to
03d2079
Compare
@rvogg wrote:
I understand. @nickhutchinson made several Windows-related improvements (#757, #780, #789, maybe more) of the test suite, but it was never enabled in CI so I don't think it worked fully.
Regarding that, I think that the way to make basedir work in a reasonable cross-platform way is to start using |
@rvogg ping |
Rebased and created a new PR #1133 |
With these changes I made some adaptations that the tests run under Windows again.
Tests that fail and cannot be fixed quickly have been deactivated for the moment.
Additionally I added mingw-w64 builds under Windows, because the msvc builds contain other bugs.
In some places I had to give the shell scripts a '.sh' extension to make them run under Windows. It looks like this does not affect the other operating systems.
( CCACHE_DETECT_SHEBANG does not work correctly -> The tests produce a "could_not_find_compiler" error if the .sh extension is missing.)
I hope this change helps avoid breaking existing behavior on Windows and make ccache even better on Windows.
Note: The secondary_http test fails sporadically on Windows. (Perhaps it should also be disabled)