OSDN Git Service

tests/docker: do not duplicate rules for hexagon-cross
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Apr 2022 09:10:06 +0000 (10:10 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 20 Apr 2022 15:04:20 +0000 (16:04 +0100)
The commands for docker-image-debian-hexagon-cross are the same as those
in debian-toolchain-run, just with a nonstandard path to build-toolchain.sh.
Reuse the definition by renaming the debian-hexagon-cross.docker.d directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-9-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-12-alex.bennee@linaro.org>

tests/docker/Makefile.include
tests/docker/dockerfiles/debian-hexagon-cross.d/build-toolchain.sh [moved from tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh with 100% similarity]

index 2a187cb..eb100c2 100644 (file)
@@ -121,28 +121,6 @@ docker-image-debian11: NOUSER=1
 # alpine has no adduser
 docker-image-alpine: NOUSER=1
 
-#
-# The build rule for hexagon-cross is special in so far for most of
-# the time we don't want to build it. While dockers caching does avoid
-# this most of the time sometimes we want to force the issue.
-#
-docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker
-       $(if $(NOCACHE),                                                                \
-               $(call quiet-command,                                                   \
-                       $(DOCKER_SCRIPT) build -t qemu/debian-hexagon-cross -f $<       \
-                       $(if $V,,--quiet) --no-cache                                    \
-                       --registry $(DOCKER_REGISTRY) --extra-files                     \
-                       $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker.d/build-toolchain.sh, \
-                       "BUILD", "debian-hexagon-cross"),                               \
-               $(call quiet-command,                                                   \
-                       $(DOCKER_SCRIPT) fetch $(if $V,,--quiet)                        \
-                               qemu/debian-hexagon-cross $(DOCKER_REGISTRY),           \
-                       "FETCH", "debian-hexagon-cross")                                \
-               $(call quiet-command,                                                   \
-                       $(DOCKER_SCRIPT) update $(if $V,,--quiet)                       \
-                               qemu/debian-hexagon-cross --add-current-user,           \
-                       "PREPARE", "debian-hexagon-cross"))
-
 debian-toolchain-run = \
        $(if $(NOCACHE),                                                \
                $(call quiet-command,                                   \
@@ -162,6 +140,10 @@ debian-toolchain-run = \
                        "PREPARE", $1))
 debian-toolchain = $(call debian-toolchain-run,$(patsubst docker-image-%,%,$1))
 
+docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker \
+       $(DOCKER_FILES_DIR)/debian-hexagon-cross.d/build-toolchain.sh
+       $(call debian-toolchain, $@)
+
 docker-image-debian-microblaze-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \
     $(DOCKER_FILES_DIR)/debian-microblaze-cross.d/build-toolchain.sh
        $(call debian-toolchain, $@)