Patchwork D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

login
register
mail settings
Submitter phabricator
Date Nov. 27, 2018, 4:13 p.m.
Message ID <d0a617edbf99af61046d7e0ca1f2f051@localhost.localdomain>
Download mbox | patch
Permalink /patch/36819/
State Not Applicable
Headers show

Comments

phabricator - Nov. 27, 2018, 4:13 p.m.
durin42 updated this revision to Diff 12612.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5269?vs=12536&id=12612

REVISION DETAIL
  https://phab.mercurial-scm.org/D5269

AFFECTED FILES
  tests/test-fuzz-targets.t

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
Yuya Nishihara - Nov. 28, 2018, 11:28 a.m.
> +  $ GMAKE=`which gmake`
> +  $ if [ -x $GMAKE ] ; then

Need to check whether `"$GMAKE"` is empty or not. And `which gmake` may
fail with 1.
phabricator - Nov. 28, 2018, 11:30 a.m.
yuja added a comment.


  > +  $ GMAKE=`which gmake`
  >  +  $ if [ -x $GMAKE ] ; then
  
  Need to check whether `"$GMAKE"` is empty or not. And `which gmake` may
  fail with 1.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5269

To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel

Patch

diff --git a/tests/test-fuzz-targets.t b/tests/test-fuzz-targets.t
--- a/tests/test-fuzz-targets.t
+++ b/tests/test-fuzz-targets.t
@@ -2,11 +2,18 @@ 
 
   $ cd $TESTDIR/../contrib/fuzz
 
+  $ GMAKE=`which gmake`
+  $ if [ -x $GMAKE ] ; then
+  >     MAKE=$GMAKE
+  > else
+  >     MAKE=make
+  > fi
+
 #if clang-libfuzzer
-  $ make -s clean all
+  $ $MAKE -s clean all
 #endif
 #if no-clang-libfuzzer clang-6.0
-  $ make -s clean all CC=clang-6.0 CXX=clang++-6.0
+  $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0
 #endif
 #if no-clang-libfuzzer no-clang-6.0
   $ exit 80