From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 20/26] sg-run-job: Break out per-host-prep and per-host-finish Date: Fri, 25 Sep 2015 20:15:16 +0100 Message-ID: <1443208522-24905-12-git-send-email-ian.jackson@eu.citrix.com> References: <1443181028-22705-1-git-send-email-ian.jackson@eu.citrix.com> <1443208522-24905-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfYT3-0001M4-Tb for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 19:15:38 +0000 In-Reply-To: <1443208522-24905-1-git-send-email-ian.jackson@eu.citrix.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.xenproject.org Cc: Robert Ho , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 Signed-off-by: Robert Ho Tested by: Robert Ho --- v14: Squash typo fix from Robert into this patch --- sg-run-job | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/sg-run-job b/sg-run-job index 66145b8..884a21d 100755 --- a/sg-run-job +++ b/sg-run-job @@ -23,6 +23,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 @@ -51,22 +65,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-host-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.7.10.4