CI: Run tests on cygwin#525
Open
moi15moi wants to merge 2 commits into
Open
Conversation
Member
|
It's failing because the test runner is truncating the final newline on cygwin. Not sure why. |
The PATH is restricted to /usr/bin and system32 to prevent MinGW/Windows tools on the GitHub Actions Windows runner from being picked up instead of Cygwin's own binaries. For more information, see: https://github.com/cygwin/cygwin-install-action#a-clean-path Signed-off-by: moi15moi <moi15moismokerlolilol@gmail.com>
When pkgconf_fgetline encountered a backslash-continuation followed by a CR+LF line ending, it unconditionally pushed \n to the buffer before checking whether the continuation flag was set.
This left an embedded newline in the middle of the joined line, which the fragment parser then treated as whitespace (it was splitting -foo\-bar into -foo and -bar instead of -foo-bar.)
The \n push is now guarded by the same quoted check used for the plain \n case, making the \r handler consistent with the \n handler.
This manifests on Cygwin because git on Windows checks out files with CRLF endings by default, and Cygwin's fopen("r") does not translate \r\n to \n the way the MSVC CRT does.
I found this problem due to this test that was failing:
```
FAIL: multiline-folding-cflags.test
stderr:
================================================================================
stdout did not match:
expected: [-foo-bar]
actual: [-foo -bar]
```
Signed-off-by: moi15moi <moi15moismokerlolilol@gmail.com>
7dcc9bb to
81a7d13
Compare
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.
I believe it is a good idea to run the tests on cygwin because currently, the tests doesn't pass.
I fixed the problem with
multiline-folding-cflags.test, but I couldn't found the issue with thebasic-with-colon.testtest.