]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't run link test suite when CC is an absolute path
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 30 May 2010 09:21:38 +0000 (11:21 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 30 May 2010 09:21:38 +0000 (11:21 +0200)
test.sh

diff --git a/test.sh b/test.sh
index a252f3030913d4862d6668eef9d3c99a436e384d..41c791fa90c1146e88c741afbc367ef00d3816ea 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -110,7 +110,7 @@ run_suite() {
     ${1}_suite
 
     testname="the tmp directory should be empty"
-    if [ "`find $CCACHE_DIR/tmp -type f | wc -l`" -gt 0 ]; then
+    if [ -d $CCACHE_DIR/tmp ] && [ "`find $CCACHE_DIR/tmp -type f | wc -l`" -gt 0 ]; then
         test_failed "$CCACHE_DIR/tmp is not empty"
     fi
 }
@@ -359,9 +359,13 @@ base_suite() {
 }
 
 link_suite() {
-    ln -s ../ccache $COMPILER
-    CCACHE_COMPILE="./$COMPILER"
-    base_tests
+    if [ `dirname $COMPILER` = . ]; then
+        ln -s ../ccache $COMPILER
+        CCACHE_COMPILE="./$COMPILER"
+        base_tests
+    else
+        echo "Compiler ($COMPILER) not taken from PATH -- not running link test"
+    fi
 }
 
 hardlink_suite() {