]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: docker-test must bind mount .ccache 4273/head
authorLoic Dachary <ldachary@redhat.com>
Sun, 5 Apr 2015 16:54:07 +0000 (18:54 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sun, 5 Apr 2015 19:27:28 +0000 (21:27 +0200)
run-make-check.sh relies on ccache. If ~/.ccache is not bind mounted and
$HOME is not bind mounted either, ./configure will fail with an obscure
error because it cannot create the directory. Create the directory if it
does not exist already and avoid this problem. The worst that can happen
is that an empty .ccache directory is created and never used which
should not be a major inconvenience.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/docker-test-helper.sh

index 3035f0250c342dac611d32f082d2643d10e1514a..0b914ae39e6d78f7caf9f0f9679b6c99e2a0b284 100755 (executable)
@@ -121,9 +121,8 @@ function run_in_docker() {
     local image=$(get_image_name $os_type $os_version)
     local upstream=$(get_upstream)
     local ccache
-    if test -d $HOME/.ccache ; then
-        ccache="--volume $HOME/.ccache:$HOME/.ccache"
-    fi
+    mkdir -p $HOME/.ccache
+    ccache="--volume $HOME/.ccache:$HOME/.ccache"
     if $dev ; then
         dev="--volume /dev:/dev"
     else