]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't try to run tests if the compiler isn't GCC
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 30 May 2010 12:59:55 +0000 (14:59 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 30 May 2010 12:59:55 +0000 (14:59 +0200)
test.sh

diff --git a/test.sh b/test.sh
index 0a9dcba8b5b156fa0b172c091957f66b307fc7b1..9aff0faa3dac6bf3f536db265c78fec8ab384daa 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -1305,12 +1305,21 @@ suites="$*"
 if [ -n "$CC" ]; then
     COMPILER="$CC"
 else
-    COMPILER=cc
+    COMPILER=gcc
 fi
 if [ -z "$CCACHE" ]; then
     CCACHE=`pwd`/ccache
 fi
 
+case `$COMPILER --version 2>&1 | head -1` in
+    gcc*)
+        ;;
+    *)
+        echo "$COMPILER not supported -- not running tests"
+        exit 0
+        ;;
+esac
+
 TESTDIR=testdir.$$
 rm -rf $TESTDIR
 mkdir $TESTDIR