This isn't as robust as it probably should be, but for now it'll get
the job done on the buildbots.
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG6c01fad8de32: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
(resend)
+ $ if [ -x /usr/local/bin/gmake ] ; then
+ > MAKE=gmakeIsn't this assuming that /usr/local/bin is in $PATH? IOW, shouldn't this
assignment be:
MAKE=/usr/local/bin/gmake
Perhaps, type or which can be used instead. gmake should be in PATH
if it's supposed to be used.
Updated. Note that this and its child should go on *stable*, since otherwise the test is broken on FreeBSD 11.2 there.
+ $ GMAKE=which gmake
+ $ if [ -x $GMAKE ] ; then
Need to check whether "$GMAKE" is empty or not. And which gmake may
fail with 1.
+which(1) could exit nonzero, but that's fine because we'll still end
+up without a valid executable, so we don't need to check $? here.
True, but the exit code is printed as [1].
+ $ GMAKE=which gmake
+ $ if [ -n "$GMAKE" -a -x $GMAKE ] ; then
+ > MAKE=$GMAKE
Can you try this?
if which gmake >/dev/null 2>&1; then MAKE=gmake else MAKE=make fi
If which gmake exits with 0, MAKE=gmake should work.