diff mbox series

[v1,08/24] docker: Makefile.include introduce DOCKER_SCRIPT

Message ID 20180410193919.28026-9-alex.bennee@linaro.org
State Superseded
Headers show
Series fix building of tests/tcg | expand

Commit Message

Alex Bennée April 10, 2018, 7:39 p.m. UTC
Define this in one place to make it easy to re-use.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/docker/Makefile.include | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
2.16.2

Comments

Philippe Mathieu-Daudé April 11, 2018, 3:10 p.m. UTC | #1
On 04/10/2018 04:39 PM, Alex Bennée wrote:
> Define this in one place to make it easy to re-use.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


> ---

>  tests/docker/Makefile.include | 10 ++++++----

>  1 file changed, 6 insertions(+), 4 deletions(-)

> 

> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include

> index de87341528..6a5aa9ec71 100644

> --- a/tests/docker/Makefile.include

> +++ b/tests/docker/Makefile.include

> @@ -14,6 +14,8 @@ DOCKER_TESTS := $(notdir $(shell \

>  

>  DOCKER_TOOLS := travis

>  

> +DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py

> +

>  TESTS ?= %

>  IMAGES ?= %

>  

> @@ -37,7 +39,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker

>  		echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \

>  	fi

>  	$(call quiet-command,\

> -		$(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \

> +		$(DOCKER_SCRIPT) build qemu:$* $< \

>  		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \

>  		$(if $(NOUSER),,--add-current-user) \

>  		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\

> @@ -129,11 +131,11 @@ docker-run: docker-qemu-src

>  	fi

>  	$(if $(EXECUTABLE),						\

>  		$(call quiet-command,					\

> -			$(SRC_PATH)/tests/docker/docker.py update 	\

> +			$(DOCKER_SCRIPT) update 			\

>  			$(IMAGE) $(EXECUTABLE),				\

>  			"  COPYING $(EXECUTABLE) to $(IMAGE)"))

>  	$(call quiet-command,						\

> -		$(SRC_PATH)/tests/docker/docker.py run 			\

> +		$(DOCKER_SCRIPT) run 					\

>  			$(if $(NOUSER),,-u $(shell id -u)) 		\

>  			--security-opt seccomp=unconfined		\

>  			$(if $V,,--rm) 					\

> @@ -163,4 +165,4 @@ docker-run-%:

>  	@$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE)

>  

>  docker-clean:

> -	$(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean)

> +	$(call quiet-command, $(DOCKER_SCRIPT) clean)

>
diff mbox series

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index de87341528..6a5aa9ec71 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -14,6 +14,8 @@  DOCKER_TESTS := $(notdir $(shell \
 
 DOCKER_TOOLS := travis
 
+DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py
+
 TESTS ?= %
 IMAGES ?= %
 
@@ -37,7 +39,7 @@  docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \
 	fi
 	$(call quiet-command,\
-		$(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
+		$(DOCKER_SCRIPT) build qemu:$* $< \
 		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
 		$(if $(NOUSER),,--add-current-user) \
 		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\
@@ -129,11 +131,11 @@  docker-run: docker-qemu-src
 	fi
 	$(if $(EXECUTABLE),						\
 		$(call quiet-command,					\
-			$(SRC_PATH)/tests/docker/docker.py update 	\
+			$(DOCKER_SCRIPT) update 			\
 			$(IMAGE) $(EXECUTABLE),				\
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\
-		$(SRC_PATH)/tests/docker/docker.py run 			\
+		$(DOCKER_SCRIPT) run 					\
 			$(if $(NOUSER),,-u $(shell id -u)) 		\
 			--security-opt seccomp=unconfined		\
 			$(if $V,,--rm) 					\
@@ -163,4 +165,4 @@  docker-run-%:
 	@$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE)
 
 docker-clean:
-	$(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean)
+	$(call quiet-command, $(DOCKER_SCRIPT) clean)