From bc739b8e7d02c8010a5ab0a5f4d6ed99c1bb1d37 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 18 Oct 2017 15:06:29 +0200 Subject: [PATCH] docker: allow running from srcdir != builddir build 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 Signed-off-by: Paolo Bonzini Message-Id: <1508331989-142364-1-git-send-email-pbonzini@redhat.com> Reviewed-by: Daniel P. Berrange Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 38874ec03d..02cd520590 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -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")