]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
ci/build: Make it possible to specify CC for tests
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Aug 2020 07:02:50 +0000 (09:02 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Aug 2020 14:23:15 +0000 (16:23 +0200)
ci/build

index 4baeded49689670290d8e848462746c6920b91ef..afa05ab78c072b32892aaea6e42c2179287de7e5 100755 (executable)
--- a/ci/build
+++ b/ci/build
@@ -18,5 +18,7 @@ else
     cd ${BUILDDIR:-build}
     ${CMAKE_PREFIX:-} cmake ${CMAKE_PARAMS:-} ${CCACHE_LOC:-..}
     ${CMAKE_PREFIX:-} cmake --build . ${BUILDEXTRAFLAGS:-} -- -j$JOBS
-    [ "${RUN_TESTS:-1}" -ne "1" ] || ctest --output-on-failure -j$JOBS "$@"
+    if [ "${RUN_TESTS:-1}" -eq 1 ]; then
+        CC=${TEST_CC:-${CC}} ctest --output-on-failure -j$JOBS "$@"
+    fi
 fi