From 885d98e8946707b899605e043ede504f4f26fb87 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Mon, 17 Sep 2018 22:28:42 +0100 Subject: [PATCH] Timeout builds --- compile/eclipsebuild/eclipseds5build.gsh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index c81e200..cd31301 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -8,6 +8,7 @@ def doDisplayLeftovers() { ps aux | grep "eclipse" ps aux | grep "make" ps aux | grep "arm-linux" + ps aux | grep "sh" """ } } @@ -135,11 +136,14 @@ def doBuild(apps, ds5folder, toolchainfolder, ds5shellcommand, buildcommand, sou doRegisterToolchain(ds5folder, toolchainfolder) echo "Build command: ${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\'" if (isUnix()) { - sh """ - echo Start time: `date` - ${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\' - echo End time: `date` - """ + timeout(time: 5, unit: MINUTES) { + sh """ + echo Start time: `date` + ${ds5shellcommand} \'${buildcommand} -no-indexer ${buildtype} \"${project}/${build_variant}\"\' + echo End time: `date` + """ + } + sleep(time: 4, unit: SECONDS) } else { bat """