diff options
author | Martin Roth <gaumless@gmail.com> | 2023-05-27 18:13:51 -0600 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2023-06-02 22:12:27 +0000 |
commit | 5a4cedb9c1ddebd051c61cdbae420c59732f63d0 (patch) | |
tree | 06879013343601100b9613e18778a782a85102a4 /util/docker | |
parent | 4aa31ac3f974df74976ee4f970a90ea14ca617f6 (diff) |
util/docker: Split coreboot-sdk test into its own docker image
This allows the coreboot-sdk docker image to build properly even if the
testing fails, and keeps the added overhead out of the coreboot-sdk
image.
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I6488799256f57ad64e14c93e7317b7ad2a71781c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75494
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'util/docker')
-rw-r--r-- | util/docker/Makefile | 5 | ||||
-rw-r--r-- | util/docker/coreboot-sdk-test/Dockerfile | 33 | ||||
-rw-r--r-- | util/docker/coreboot-sdk/Dockerfile | 34 |
3 files changed, 38 insertions, 34 deletions
diff --git a/util/docker/Makefile b/util/docker/Makefile index cbe34f9291..c86d8fd36a 100644 --- a/util/docker/Makefile +++ b/util/docker/Makefile @@ -48,6 +48,11 @@ coreboot-sdk: test-docker sed "s/{{CROSSGCC_PARAM}}/$(COREBOOT_CROSSGCC_PARAM)/g" | \ $(DOCKER) build -t coreboot/coreboot-sdk:$(COREBOOT_IMAGE_TAG) - +coreboot-sdk-test: coreboot-sdk test-docker + @echo "Testing coreboot SDK $(crossgcc_version), built from commit $(DOCKER_COMMIT)" + cat coreboot-sdk-test/Dockerfile | \ + $(DOCKER) build -t coreboot/coreboot-sdk-test:$(COREBOOT_IMAGE_TAG) - + upload-coreboot-sdk: test-docker-login $(DOCKER) push coreboot/coreboot-sdk:$(COREBOOT_IMAGE_TAG) diff --git a/util/docker/coreboot-sdk-test/Dockerfile b/util/docker/coreboot-sdk-test/Dockerfile new file mode 100644 index 0000000000..0ea57d123f --- /dev/null +++ b/util/docker/coreboot-sdk-test/Dockerfile @@ -0,0 +1,33 @@ +FROM coreboot-sdk +# Test the built image +RUN mkdir -p /tmp/work && \ + cd /tmp/work && \ + git clone https://review.coreboot.org/bios_extract.git && \ + make -C bios_extract && \ + git clone https://review.coreboot.org/memtest86plus.git && \ + make -C memtest86plus && \ + git clone https://review.coreboot.org/flashrom.git && \ + CONFIG_EVERYTHING=yes make -C flashrom && \ + git clone https://review.coreboot.org/em100.git && \ + make -C em100 && \ + git clone https://review.coreboot.org/coreboot.git && \ + (cd coreboot && git submodule update --init --checkout ) && \ + make -C coreboot CPUS=$(nproc) test-abuild + +RUN \ + cd /tmp/work && \ + make -C coreboot olddefconfig && \ + make -C coreboot all -j && \ + make -C coreboot printall && \ + make -C coreboot filelist && \ + make -C coreboot ctags-project && \ + make -C coreboot cscope-project + +RUN \ + cd /tmp/work && \ + make -C coreboot test-payloads&& \ + make -C coreboot test-tools -j && \ + make -C coreboot test-lint -j && \ + make -C coreboot test-cleanup -j && \ + cd && \ + rm -rf /tmp/work/ diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile index d645aa0b84..74b80ab04b 100644 --- a/util/docker/coreboot-sdk/Dockerfile +++ b/util/docker/coreboot-sdk/Dockerfile @@ -114,38 +114,4 @@ ENV SDK_COMMIT={{DOCKER_COMMIT}} USER coreboot FROM coreboot-sdk -# Test the built image -RUN mkdir -p /tmp/work && \ - cd /tmp/work && \ - git clone https://review.coreboot.org/bios_extract.git && \ - make -C bios_extract && \ - git clone https://review.coreboot.org/memtest86plus.git && \ - make -C memtest86plus && \ - git clone https://review.coreboot.org/flashrom.git && \ - CONFIG_EVERYTHING=yes make -C flashrom && \ - git clone https://review.coreboot.org/em100.git && \ - make -C em100 && \ - git clone https://review.coreboot.org/coreboot.git && \ - (cd coreboot && git submodule update --init --checkout ) && \ - make -C coreboot CPUS=$(nproc) test-abuild - -RUN \ - cd /tmp/work && \ - make -C coreboot olddefconfig && \ - make -C coreboot all -j && \ - make -C coreboot printall && \ - make -C coreboot filelist && \ - make -C coreboot ctags-project && \ - make -C coreboot cscope-project - -RUN \ - cd /tmp/work && \ - make -C coreboot test-payloads&& \ - make -C coreboot test-tools -j && \ - make -C coreboot test-lint -j && \ - make -C coreboot test-cleanup -j && \ - cd && \ - rm -rf /tmp/work/ - -FROM coreboot-sdk VOLUME /home/coreboot/.ccache |