]> Zhao Yanbai Git Server - minix.git/commitdiff
testsh2: allow compiler fallback to gcc 68/868/4
authorBen Gras <ben@minix3.org>
Fri, 27 Sep 2013 15:57:41 +0000 (15:57 +0000)
committerGerrit Code Review <gerrit@gerrit>
Wed, 2 Oct 2013 17:15:23 +0000 (19:15 +0200)
. lets test work in 'pure DESTDIR' environment

Change-Id: If7d45f01f20bc6369455d706b5ad47d36946fce3

test/testsh2.sh

index 0a30b420f64630cd87a576ca6b1f924332c61719..f4b4f7ad814622c8f6682692644530c65cab79b7 100755 (executable)
@@ -20,7 +20,13 @@ OLDPWD=`pwd`
 export OLDPWD
 
 # CC="exec cc -wo -F"          # nonstandard flags for ACK :-(
-CC=clang
+if which clang 2>/dev/null
+then   CC=clang
+elif which gcc 2>/dev/null
+then   CC=gcc
+else   echo "Can't find a compiler, skipping test"
+       exit 0
+fi
 
 ARCH=`arch`