From 8986b181a6c88e2de085ef59d6177779e93824f9 Mon Sep 17 00:00:00 2001 From: /dev/root Date: Tue, 12 Mar 2019 20:15:24 +0100 Subject: [PATCH] Add timeout to linux unittest --- Jenkinsfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 55638ac8..0fb6a5ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -268,15 +268,17 @@ gitlabBuilds(builds: ["Checkout & Versioning", "Build", "Testing", "Archiving"]) } executions["$testName on Linux"] = { node("docker && linux && amd64") { - wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { - def image = null - dir("src") { - unstash "jenkins-files" - image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins") - deleteDir() - } - image.inside { - doUnitTests(test.StashName) + timeout(time: 10, unit: "MINUTES") { + wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { + def image = null + dir("src") { + unstash "jenkins-files" + image = docker.build("github.com/IW4x/iw4x-client-testing-wine32", "--rm --force-rm -f jenkins/wine32.Dockerfile jenkins") + deleteDir() + } + image.inside { + doUnitTests(test.StashName) + } } } }