Skip to content

CI: Run tests on cygwin#525

Open
moi15moi wants to merge 2 commits into
pkgconf:masterfrom
moi15moi:CI-run-test-on-cygwin
Open

CI: Run tests on cygwin#525
moi15moi wants to merge 2 commits into
pkgconf:masterfrom
moi15moi:CI-run-test-on-cygwin

Conversation

@moi15moi

@moi15moi moi15moi commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

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 the basic-with-colon.test test.

@kaniini

kaniini commented Jun 9, 2026

Copy link
Copy Markdown
Member

It's failing because the test runner is truncating the final newline on cygwin. Not sure why.

moi15moi added 2 commits June 8, 2026 21:21
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>
@moi15moi moi15moi force-pushed the CI-run-test-on-cygwin branch from 7dcc9bb to 81a7d13 Compare June 9, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants