Fix coccinelle linking regression test on Cygwin#13738
Merged
dra27 merged 3 commits intoocaml:trunkfrom Jan 16, 2025
Merged
Conversation
Member
|
I really don't remember a good reason for setting either |
Member
|
Note: I believe that the correct spelling is "coccinelle" (see the software page), with two consecutive "c" to sound like an "x", so while we are at it we could also fix this. |
Native code version of the test specifies that the program is coccinelle.exe (on all platforms) and the output coccinelle. On Cygwin, these are the same file and setting up the output therefore truncates the program before it runs.
63c29ec to
21a98e6
Compare
Member
Author
|
gasche
approved these changes
Jan 16, 2025
dra27
added a commit
that referenced
this pull request
Jan 23, 2025
Fix coccinelle linking regression test on Cygwin (cherry picked from commit b542018)
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.
#13673 added a test which includes:
ocaml/testsuite/tests/badly-ordered-deps/cocinelle.ml
Lines 27 to 29 in 49baed7
where the program is
cocinelle.exe(on all platforms) and result of running that program is sent to the fileconcinelle.This doesn't work on Cygwin, as
cocinelle.exeis created first, and at that pointcocinelleandcocinelle.exeare the same file. When ocamltest tries to run./cocinelle.exeit dutifully redirects stdout tococinelleand Cygwin dutifully truncatesconcinelle.exe. Executing an empty executable returns code 0, and then the check on the output correctly fails.I've fixed it by adding
.output(which is what the only other test which uses this feature does), although it's not entirely clear to me why eitheroutputorprogramis being set here, @Octachron?