-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
tests: add support to test cross-compiled via Windows Subsystem for Linux (WIP) #3899
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
Conversation
@bagder Any thoughts about the structure of this? I am still thinking about a better approach to specify the executable extension for different parts of the testsuite, e.g. via additional runtests.pl and testcurl.pl parameters. Finally I would also like to achieve the possibility of compiling the test servers for Linux while the rest is still cross-compiled so that the Windows build of curl could be tested against test servers that do not include crazy Windows workarounds. A solution which I haven't tested yet, could be to run ./configure twice, once for Linux and once for Windows and then only making the servers for Linux. |
Rebased to current master and updated logmsg to only force \r\n on Windows Subsystem for Linux. |
Rebased to current master and removed weird special character from runtests.pl that caused: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@bagder Would you mind taking a look at this idea? |
I think the idea is fine. It is possibly a bit icky for users to have to set multiple long environment variables to get it going, but it also seems like a rather edge use case so I doubt we will see wide adoption and use of this. I don't run/use Windows myself. I can't comment on the specifics as I haven't tested this. |
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.
Looks fine to me, but I have not tested it!
Can we get someone who uses WSL to review this, @MarcelRaad don't mean to single you out but I know you've used it... |
@MarcelRaad @bagder @jay Thanks for the feedback, I guess this can be merged in it's current state and additional improvements done in a separate PR. |
Bash in Windows Subsystem for Linux (WSL) requires it for some reason. (This is one of several commits to support use of WSL for the tests.) Ref: curl#3899
Keys created on Windows Subsystem for Linux (WSL) require it for some reason. (This is one of several commits to support use of WSL for the tests.) Ref: curl#3899
This enables the use of Windows Subsystem for Linux (WSL) to run the testsuite against Windows binaries while using Linux servers. This commit introduces the following environment variables: - CURL_TEST_EXE_EXT: set the executable extension for all components - CURL_TEST_EXE_EXT_TOOL: set it for the curl tool only - CURL_TEST_EXE_EXT_SSH: set it for the SSH tools only Later testcurl.pl could be adjusted to make use of those variables. - CURL_TEST_EXE_EXT_SRV: set it for the test servers only (This is one of several commits to support use of WSL for the tests.) Closes curl#3899
Travis CI wasn't listed in the check for some reason. I've prepared the commits and rebased on master and force pushed to your branch, hopefully the travis ci will run now. |
Very green! |
This enables the use of Windows Subsystem for Linux to run the
testsuite against Windows binaries while using Linux servers.
This PR introduces the following environment variables:
Later testcurl.pl could be adjusted to make use of those variables.
Example usage:
CURL_TEST_EXE_EXT_TOOL=.exe CURL_TEST_EXE_EXT_SRV=.exe ./runtests.pl -a
This will use .exe variants for the curl tool and the test servers, but not for OpenSSH commands and therefore enables testing Windows curl against known good Linux OpenSSH (instead of a Windows port).
This PR requires #3290 and therefore currently carries b9f8937afa936be7fbc503aa02ace28ef6c74206 with it until #3290 is merged.