From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Ho Subject: [OSSTest Nested v12 13/21] sg-run-job: Break out per-host-prep and per-host-finish Date: Fri, 28 Aug 2015 23:08:02 +0800 Message-ID: <1440774490-16725-14-git-send-email-robert.hu@intel.com> References: <1440774490-16725-1-git-send-email-robert.hu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1440774490-16725-1-git-send-email-robert.hu@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, robert.hu@intel.com Cc: wei.liu2@citrix.com, Ian Jackson , ian.campbell@citrix.com, di.zheng@intel.com, gordon.jin@intel.com List-Id: xen-devel@lists.xenproject.org From: Ian Jackson No functional change. We now call the per-host-ts finish steps unconditionally, rather than only if !$need_build_host, per-host-ts is (complicated) no-op if $need_build_host, since in that case $need_xen_hosts is {}. Signed-off-by: Ian Jackson Tested by: Robert Ho --- sg-run-job | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/sg-run-job b/sg-run-job index ec03cce..0614d20 100755 --- a/sg-run-job +++ b/sg-run-job @@ -24,6 +24,20 @@ source ./tcl/osstestlib.tcl readconfig source-method JobDB +proc per-host-prep {} { + per-host-ts . host-ping-check-native/@ ts-host-ping-check + per-host-ts . xen-install/@ ts-xen-install + per-host-ts . xen-boot/@ ts-host-reboot + + per-host-ts . host-ping-check-xen/@ ts-host-ping-check + per-host-ts . =(*) {ts-leak-check basis} +} + +proc per-host-finish {} { + per-host-ts . = {ts-leak-check check} + per-host-ts !broken capture-logs/@(*) ts-logs-capture +} + proc run-job {job} { global jobinfo builds flight ok need_xen_hosts anyfailed @@ -52,22 +66,15 @@ proc run-job {job} { if {$ok} { setstatus running } per-host-ts broken host-install/@(*) ts-host-install-twice - per-host-ts . host-ping-check-native/@ ts-host-ping-check - per-host-ts . xen-install/@ ts-xen-install - per-host-ts . xen-boot/@ ts-host-reboot - per-host-ts . host-ping-check-xen/@ ts-host-ping-check - per-host-ts . =(*) {ts-leak-check basis} + per-hosts-prep if {$ok} { catching-otherwise fail run-job/$jobinfo(recipe) } - per-host-ts . = {ts-leak-check check} - if {!$need_build_host} { - per-host-ts !broken capture-logs/@(*) ts-logs-capture - } else { - if {$anyfailed} { - run-ts !broken capture-logs ts-logs-capture + host - } + per-host-finish + + if {$need_build_host && $anyfailed} { + run-ts !broken capture-logs ts-logs-capture + host } if {$ok} { setstatus pass } -- 1.8.3.1