From e466892cde2edb19297f14075f45ba960e9122e2 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 14 Sep 2018 16:34:03 +0100 Subject: [PATCH] Kill any left overs from previous builds before proceeding --- compile/eclipsebuild/eclipseds5build.gsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/compile/eclipsebuild/eclipseds5build.gsh b/compile/eclipsebuild/eclipseds5build.gsh index dfefd02..1c213d5 100644 --- a/compile/eclipsebuild/eclipseds5build.gsh +++ b/compile/eclipsebuild/eclipseds5build.gsh @@ -1,4 +1,19 @@ +def doKillLeftovers() { + if (isUnix()) { + sh """ + # Killing any processes that may interfere with the next build + # The build system must be setup to do more than one eclipse build concurrently + ps aux | grep "eclipsews" + ps aux | grep "make" + ps aux | grep "arm-linux" + pkill -9 eclipsews + pkill -9 make + pkill -9 "*arm-linux*" + """ + } +} + def doExport(exportfolder, exportpathlist, project = "", build_variant = "") { def result = 0 for (exportpath in exportpathlist) { @@ -60,6 +75,7 @@ def doBuild(apps, exportfolder = "${WORKSPACE}/bin") { echo "Build command: ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\'" if (isUnix()) { sh """ + doKillLeftovers() echo Start time: `date` ${DS5SHELL} \'${BUILD_COMMAND} ${buildtype} \"${project}/${build_variant}\"\' echo End time: `date`