From e3d9b2bfbe7fac39d3f29dc825257af28ee3bc9c Mon Sep 17 00:00:00 2001 From: retropikzel Date: Thu, 10 Jul 2025 07:27:18 +0300 Subject: [PATCH] Fixing Jenkins tests --- Jenkinsfile | 8 ++++---- dockerfiles/Dockerfile.snow-chibi-install-test | 3 ++- dockerfiles/Dockerfile.test | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e2567ac..4e0f0f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,15 +18,15 @@ pipeline { implementations.each { implementation-> stage("${implementation} install") { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh "timeout 60 docker build --build-arg SCHEME=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.snow-chibi-install-test ." - sh "timeout 60 docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make clean package install-jenkins SCHEME=${implementation} && cp tests/hello.scm /tmp/ && cd /tmp && SCHEME=${implementation} compile-r7rs -o hello hello.scm && ./hello\"" + sh "docker build --build-arg SCHEME=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.snow-chibi-install-test ." + sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make clean package install-jenkins SCHEME=${implementation} && cp tests/hello.scm /tmp/ && cd /tmp && SCHEME=${implementation} compile-r7rs -o hello hello.scm && ./hello\"" } } tests.each { test -> stage("${implementation} ${test}") { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh "timeout 600 docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.test ." - sh "timeout 600 docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make SCHEME=${implementation} TEST=${test} clean test\"" + sh "docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.test ." + sh "docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make SCHEME=${implementation} TEST=${test} clean test\"" } } } diff --git a/dockerfiles/Dockerfile.snow-chibi-install-test b/dockerfiles/Dockerfile.snow-chibi-install-test index c1f92ab..b2a2a28 100644 --- a/dockerfiles/Dockerfile.snow-chibi-install-test +++ b/dockerfiles/Dockerfile.snow-chibi-install-test @@ -1,3 +1,4 @@ +ARG SCHEME=chibi FROM debian:bookworm AS build RUN apt-get update && apt-get install -y git make chicken-bin build-essential RUN chicken-install r7rs @@ -20,9 +21,9 @@ RUN apt-get update && apt-get install -y \ markdown \ pandoc \ weasyprint -COPY --from=build /usr/local/bin/compile-r7rs /usr/local-other/bin/compile-r7rs RUN git clone https://github.com/ashinn/chibi-scheme.git --depth=1 RUN cd chibi-scheme && make && make install +COPY --from=build /usr/local/bin/compile-r7rs /usr/local/bin/compile-r7rs ARG SCHEME=chibi ENV COMPILE_R7RS=${SCHEME} RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm diff --git a/dockerfiles/Dockerfile.test b/dockerfiles/Dockerfile.test index 3006043..6de4226 100644 --- a/dockerfiles/Dockerfile.test +++ b/dockerfiles/Dockerfile.test @@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y \ build-essential \ libffi-dev \ libmbedtls-dev -COPY --from=build /usr/local/bin/compile-r7rs /usr/local-other/bin/compile-r7rs +COPY --from=build /usr/local/bin/compile-r7rs /usr/local/bin/compile-r7rs ARG SCHEME=chibi ENV COMPILE_R7RS=${SCHEME} RUN mkdir -p ${HOME}/.snow && echo "()" > ${HOME}/.snow/config.scm