From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hu Subject: Re: [OSSTEST PATCH 3/4] sg-run-job: Break out per-host-prep and per-host-finish Date: Tue, 28 Jul 2015 13:39:47 +0800 Message-ID: <1438061987.29989.3.camel@localhost> References: <21892.2155.313678.103280@mariner.uk.xensource.com> <1435682181-11151-1-git-send-email-ian.jackson@eu.citrix.com> <1435682181-11151-4-git-send-email-ian.jackson@eu.citrix.com> Reply-To: robert.hu@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZJxbX-0008Sk-4h for xen-devel@lists.xenproject.org; Tue, 28 Jul 2015 05:39:07 +0000 In-Reply-To: <1435682181-11151-4-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: Ian Jackson Cc: xen-devel@lists.xenproject.org, LongtaoX Pang , "Ian Campbell@citrix.com" , Robert Hu List-Id: xen-devel@lists.xenproject.org On Tue, 2015-06-30 at 17:36 +0100, Ian Jackson wrote: > 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 > --- > sg-run-job | 31 +++++++++++++++++++------------ > 1 file changed, 19 insertions(+), 12 deletions(-) > > diff --git a/sg-run-job b/sg-run-job > index 33a836b..312b0d7 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 a trivial typo, I think 'per-host-prep' shall be. > > 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 }