druntime-test: Detect musl more robustly#21741
Conversation
|
Thanks for your pull request and interest in making D better, @the-horo! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#21741" |
|
Spotted this in the ldc CI: ldc-developers/ldc#4969 (comment) |
78738e9 to
01e0354
Compare
|
One issue with this PR is that it now treats |
druntime/Makefile
Outdated
|
|
||
| ifeq (linux,$(OS)) | ||
| LDD = ldd | ||
| IS_MUSL != $(LDD) --version 2>&1 | grep -q musl && echo 1 |
There was a problem hiding this comment.
That's IMO some weird/unintuitive syntax; found it in https://www.gnu.org/software/make/manual/html_node/Setting.html. I think the $(shell …) wrapper is easier to understand.
There was a problem hiding this comment.
The reason for using != is that it's part of posix, not a gnu extension. It's also documented on https://www.gnu.org/software/make/manual/html_node/Shell-Function.html.
I don't object to changing it, if the gnu syntax is preferred, since the makefiles already rely on it
There was a problem hiding this comment.
Oh, so that != is actually standard, whereas $(shell) is an extension?! - I count 3 != occurrences in DMD master Makefiles (all Valgrind-related), and 16 $(shell).
No too strong opinion from my side, except that I find the != extremely unintuitive.
No strong opinion from my side, we can also go with defined/undefined instead of checking for a |
|
Oh and please document the new variable in |
My only concern is changing something that worked before. However, dmd and ldc should be the only ones that touch these files so, if you're fine with it, I'll keep the syntax. |
01e0354 to
82d4946
Compare
Try to detect musl on more systems than just Alpine. This also fixes an issue in the Github runners where the default shell is dash which doesn't understand the `&>` operator leading to the musl-excluded tests to also be skipped on glibc linux. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
82d4946 to
b3fca91
Compare
Try to detect musl on more systems than just Alpine.
This also fixes an issue in the Github runners where the default shell is dash which doesn't understand the
&>operator leading to the musl-excluded tests to also be skipped on glibc linux.