From d5b57a95b820e0516f8337336f309ac3e187ccfa Mon Sep 17 00:00:00 2001 From: retropikzel Date: Wed, 9 Jul 2025 06:08:58 +0300 Subject: [PATCH] Add timeouts to running tests in Jenkins --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6701b8d..bbe0f34 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,15 +18,15 @@ pipeline { tests.each { test -> stage("${implementation} ${test}") { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - 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 COMPILE_R7RS=${implementation} TESTNAME=primitives test-compile-r7rs\"" + 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 COMPILE_R7RS=${implementation} TESTNAME=primitives test-compile-r7rs\"" } } } stage("${implementation} snow-chibi install test") { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { - sh "docker build --build-arg COMPILE_R7RS=${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 build install-jenkins COMPILE_R7RS=${implementation} && cp tests/hello.scm /tmp/ && cd /tmp && COMPILE_R7RS=${implementation} compile-r7rs -o hello hello.scm && ./hello\"" + sh "timeout 600 docker build --build-arg COMPILE_R7RS=${implementation} --tag=r7rs-pffi-test-${implementation} -f dockerfiles/Dockerfile.snow-chibi-install-test ." + sh "timeout 600 docker run -v ${WORKSPACE}:/workdir -w /workdir -t r7rs-pffi-test-${implementation} sh -c \"make build install-jenkins COMPILE_R7RS=${implementation} && cp tests/hello.scm /tmp/ && cd /tmp && COMPILE_R7RS=${implementation} compile-r7rs -o hello hello.scm && ./hello\"" } } }