docker DEF_TARGET_LIST cleanup
cover docker DEF_TARGET_LIST cleanup
Hi,
While reviewing Markus' header cleanups I realised my advice to use:
make docker-test-build
to run through all the various builds would miss some of the cases that shippable catches. This is because the default target list is hard-coded into the tests. This series allows it to be over-ridden by each docker image by setting the DEF_TARGET_LIST env variable. The user still has full control of the target list by calling:
make docker-test-build TARGET_LIST=foo
Alex Bennée (2):
tests/docker: move DEF_TARGET_LIST setting to common.rc tests/docker: set DEF_TARGET_LIST for some containers
tests/docker/common.rc | 4 ++++ tests/docker/dockerfiles/debian-arm64-cross.docker | 1 + tests/docker/dockerfiles/debian-armel-cross.docker | 1 + tests/docker/dockerfiles/debian-armhf-cross.docker | 1 + tests/docker/dockerfiles/debian-mips-cross.docker | 1 + tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 + tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 + tests/docker/dockerfiles/debian-s390x-cross.docker | 1 + tests/docker/test-build | 1 - tests/docker/test-mingw | 1 - tests/docker/test-quick | 1 - 11 files changed, 11 insertions(+), 3 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/2 tests/docker: move DEF_TARGET_LIST setting to common.rc
We might as well not repeat ourselves. At the same time allow it to be overridden which we will use later from docker targets.
--- tests/docker/common.rc | 4 ++++ tests/docker/test-build | 1 - tests/docker/test-mingw | 1 - tests/docker/test-quick | 1 - 4 files changed, 4 insertions(+), 3 deletions(-)
tests/docker/common.rc +4 -0
@@ -11,6 +11,10 @@ # or (at your option) any later version. See the COPYING file in # the top-level directory. +# This might be set by ENV of a docker container... it is always +# overriden by TARGET_LIST if the user sets it. +DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"} + requires() { for c in $@; do
tests/docker/test-build +0 -1
@@ -15,7 +15,6 @@ cd "$BUILD_DIR" -DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu install_qemu
tests/docker/test-mingw +0 -1
@@ -16,7 +16,6 @@ requires mingw dtc cd "$BUILD_DIR" -DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
tests/docker/test-quick +0 -1
@@ -15,7 +15,6 @@ cd "$BUILD_DIR" -DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu check_qemu
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v1 1/2] tests/docker: move DEF_TARGET_LIST setting to common.rc
Quoted 4 lines · Alex Bennée
We might as well not repeat ourselves. At the same time allow it to be overridden which we will use later from docker targets.
Signed-off-by Alex Bennée <[email protected]>
Quoted 59 lines
--- tests/docker/common.rc | 4 ++++ tests/docker/test-build | 1 - tests/docker/test-mingw | 1 - tests/docker/test-quick | 1 - 4 files changed, 4 insertions(+), 3 deletions(-)tests/docker/common.rc +4
-0@@ -11,6 +11,10 @@ # or (at your option) any later version. See the COPYING file in # the top-level directory. +# This might be set by ENV of a docker container... it is always +# overriden by TARGET_LIST if the user sets it. +DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"} + requires() { for c in $@; dotests/docker/test-build +0
-1@@ -15,7 +15,6 @@ cd "$BUILD_DIR" -DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu install_qemutests/docker/test-mingw +0
-1@@ -16,7 +16,6 @@ requires mingw dtc cd "$BUILD_DIR" -DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \tests/docker/test-quick +0
-1@@ -15,7 +15,6 @@ cd "$BUILD_DIR" -DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu" TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \ build_qemu check_qemu
PATCH 2/2 tests/docker: set DEF_TARGET_LIST for some containers
In reply to Alex BennéeYou can assume the failures most people are interested in are the cross-compile failures that are specific to the cross compile target. Set DEF_TARGET_LIST based on what we use for shippable, the user can always override by calling with TARGET_LIST set.
--- tests/docker/dockerfiles/debian-arm64-cross.docker | 1 + tests/docker/dockerfiles/debian-armel-cross.docker | 1 + tests/docker/dockerfiles/debian-armhf-cross.docker | 1 + tests/docker/dockerfiles/debian-mips-cross.docker | 1 + tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 + tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 + tests/docker/dockerfiles/debian-s390x-cross.docker | 1 + 7 files changed, 7 insertions(+)
tests/docker/dockerfiles/debian-arm64-cross.docker +1 -0
@@ -17,6 +17,7 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu- +ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \
tests/docker/dockerfiles/debian-armel-cross.docker +1 -0
@@ -15,6 +15,7 @@ RUN dpkg --add-architecture armel && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi- +ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \
tests/docker/dockerfiles/debian-armhf-cross.docker +1 -0
@@ -17,6 +17,7 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf- +ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \
tests/docker/dockerfiles/debian-mips-cross.docker +1 -0
@@ -20,6 +20,7 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu- +ENV DEF_TARGET_LIST mips-softmmu,mipsel-linux-user # Install extra libraries to increase code coverage RUN apt update && \
tests/docker/dockerfiles/debian-mips64el-cross.docker +1 -0
@@ -21,6 +21,7 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64- +ENV DEF_TARGET_LIST mips64el-softmmu,mips64el-linux-user # Install extra libraries to increase code coverage RUN apt update && \
tests/docker/dockerfiles/debian-ppc64el-cross.docker +1 -0
@@ -16,6 +16,7 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu- +ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user # Install extra libraries to increase code coverage RUN apt update && \
tests/docker/dockerfiles/debian-s390x-cross.docker +1 -0
@@ -21,6 +21,7 @@ RUN apt update && \ # Specify the cross prefix for this image (see tests/docker/common.rc) ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu- +ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user # Install extra libraries to increase code coverage RUN apt update && \
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v1 2/2] tests/docker: set DEF_TARGET_LIST for some containers
Hi Alex,
Quoted 4 lines · Alex Bennée
You can assume the failures most people are interested in are the cross-compile failures that are specific to the cross compile target. Set
DEF_TARGET_LISTbased on what we use for shippable, the user can always override by calling withTARGET_LISTset.
Some thoughts about this commit description:
I always wondered why .shippable.yml had this IMAGE/TARGET_LIST relation, because while using TCG I'm always interested in the opposite, compile for targets different than my host (except the endianess case, where compiling for the opposite endianess might also be useful).
Now I can understand than when using KVM, one is interested in compiling the same target than the host. However in the Docker cross-compilation case we mostly can not test for KVM on the host...
Time for a host/os/target/feature/... CI matrix list on the wiki? :)