docker: allow running from srcdir != builddir build
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Oct 2017 13:06:29 +0000 (15:06 +0200)
committerFam Zheng <famz@redhat.com>
Fri, 20 Oct 2017 06:28:50 +0000 (14:28 +0800)
The new script uses "git submodule", which is picky about being invoked
from the top of the git checkout.  Invoke the script from $(SRC_PATH)
to avoid git's wrath.

Fixes: b7f404201e45e99da23b9764dec27ce5f965cdcd
Cc: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1508331989-142364-1-git-send-email-pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
tests/docker/Makefile.include

index 38874ec03d977d327d6808e355394db503bc0b75..02cd5205906db377c61b23a1586796918308a397 100644 (file)
@@ -18,11 +18,11 @@ TESTS ?= %
 IMAGES ?= %
 
 CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
-DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
+DOCKER_SRC_COPY := $(BUILD_DIR)/docker-src.$(CUR_TIME)
 
 $(DOCKER_SRC_COPY):
        @mkdir $@
-       $(call quiet-command, $(SRC_PATH)/scripts/archive-source.sh $@/qemu.tar, \
+       $(call quiet-command, cd $(SRC_PATH) && scripts/archive-source.sh $@/qemu.tar, \
                "GEN", "$@/qemu.tar")
        $(call quiet-command, cp $(SRC_PATH)/tests/docker/run $@/run, \
                "COPY","RUNNER")