changeset 40726:6c01fad8de32 stable

tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t This isn't as robust as it probably should be, but for now it'll get the job done on the buildbots. Differential Revision: https://phab.mercurial-scm.org/D5269
author Augie Fackler <augie@google.com>
date Wed, 14 Nov 2018 10:11:37 -0500
parents 90e26ef4cbb1
children d9fc51f77cc5
files tests/test-fuzz-targets.t
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-fuzz-targets.t	Thu Nov 29 16:25:37 2018 -0500
+++ b/tests/test-fuzz-targets.t	Wed Nov 14 10:11:37 2018 -0500
@@ -2,11 +2,20 @@
 
   $ cd $TESTDIR/../contrib/fuzz
 
+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.
+
+  $ if which gmake >/dev/null 2>&1; 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