From patchwork Thu Jul 6 14:42:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9828475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95528604D9 for ; Thu, 6 Jul 2017 14:45:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 861BB285FB for ; Thu, 6 Jul 2017 14:45:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B13328672; Thu, 6 Jul 2017 14:45:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CF45E286B9 for ; Thu, 6 Jul 2017 14:45:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dT7zX-0008M8-Gg; Thu, 06 Jul 2017 14:42:51 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dT7zV-0008DV-DY for xen-devel@lists.xenproject.org; Thu, 06 Jul 2017 14:42:49 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 9F/9C-02185-96C4E595; Thu, 06 Jul 2017 14:42:49 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHIsWRWlGSWpSXmKPExsXitHSDvW6GT1y kwZvPMhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8b02Y3MBeekK47PeMvewPhDpIuRk0NCwF9i 3YwzbCA2m4COxMW5O4FsDg4RARWJ23sNQMLMAu4Sdy4sYgKxhQU8JC43dYCVswCV3Lj1mQXE5 hWwkuj/9owFYqSexNuJLxhBbE6g+OkrX8BsIQFLiX1fm5kh6gUlTs58wgIxX1OidftvdghbXq J562xmiHpFif55D9gmMPLNQtIyC0nLLCQtCxiZVzFqFKcWlaUW6RoZ6iUVZaZnlOQmZuboGho Y6+WmFhcnpqfmJCYV6yXn525iBIZaPQMD4w7Gnr1+hxglOZiURHkrzOMihfiS8lMqMxKLM+KL SnNSiw8xynBwKEnwLvQCygkWpaanVqRl5gCDHiYtwcGjJMJ72hkozVtckJhbnJkOkTrFaMyxY fX6L0wcryb8/8YkxJKXn5cqJc7L7w1UKgBSmlGaBzcIFo2XGGWlhHkZGRgYhHgKUotyM0tQ5V 8xinMwKgnzmoFM4cnMK4Hb9wroFCagUxQbY0BOKUlESEk1MPZutpeZu+mFX/bf4w32S/jUBTt OXt7SIKHSefI8z6TFBQrecxinXotdmOEZI3P3zfsZh8SuP1L+8dVT6d3HVN9pHjnLJ92eWtmY 0bFzb0f7/v/zxA0OP3jLsmR27Q6zSnbNyfctcnIaFly4VMCz20bP9lGdFUte+vMjYVFTb8y5v dLdq8IzVF2JpTgj0VCLuag4EQDTsO8mwQIAAA== X-Env-Sender: prvs=3536ba782=roger.pau@citrix.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1499352162!46184956!5 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26682 invoked from network); 6 Jul 2017 14:42:48 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 6 Jul 2017 14:42:48 -0000 X-IronPort-AV: E=Sophos;i="5.40,317,1496102400"; d="scan'208";a="438999924" From: Roger Pau Monne To: Date: Thu, 6 Jul 2017 15:42:24 +0100 Message-ID: <20170706144227.36580-14-roger.pau@citrix.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) In-Reply-To: <20170706144227.36580-1-roger.pau@citrix.com> References: <20170706144227.36580-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Ian.Jackson@eu.citrix.com, Roger Pau Monne Subject: [Xen-devel] [PATCH v4 13/16] osstest: change the meaning of need_build_host X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make need_build_host store a string instead of a boolean. This is later going to be expanded to handle the FreeBSD build jobs. Signed-off-by: Roger Pau Monné --- Changes since v3: - New in this version (split from patch). --- sg-run-job | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/sg-run-job b/sg-run-job index 87d81085..2ee57ace 100755 --- a/sg-run-job +++ b/sg-run-job @@ -52,12 +52,12 @@ proc run-job {job} { set skip_globs [jobdb::read-runvar $flight $job skip_testids] set nh [need-hosts/$jobinfo(recipe)] - if {![string compare $nh BUILD]} { + if {[string match BUILD_* $nh]} { set need_xen_hosts {} - set need_build_host 1 + set need_build_host [string range $nh [expr [string first _ $nh] + 1] end] } else { set need_xen_hosts $nh - set need_build_host 0 + set need_build_host {} } set nested_layers_hosts {} @@ -68,7 +68,9 @@ proc run-job {job} { eval run-ts broken = ts-hosts-allocate + $need_xen_hosts } - if {$need_build_host} { catching-otherwise broken allocate-build-host } + if {[llength $need_build_host]} { + catching-otherwise broken allocate-build-host $need_build_host + } if {$ok} { setstatus running } @@ -77,7 +79,10 @@ proc run-job {job} { if {$ok} { set syslog [spawn-ts broken = | ts-syslog-server] } - if {$need_build_host} { catching-otherwise broken prepare-build-host } + if {[llength $need_build_host]} { + catching-otherwise broken \ + prepare-build-host-[string tolower $need_build_host] + } per-host-ts broken host-install/@(*) ts-host-install-twice @@ -95,7 +100,7 @@ proc run-job {job} { set need_xen_hosts [lunappend nested_layers_hosts] } - if {$need_build_host && !$ok} { + if {[llength $need_build_host] && !$ok} { run-ts !broken capture-logs ts-logs-capture + host } @@ -116,7 +121,7 @@ proc run-job {job} { if {$ok} { setstatus pass } - if {$need_build_host && $ok} { jobdb::preserve-task 90 } + if {[llength $need_build_host] && $ok} { jobdb::preserve-task 90 } if {!$ok} { jobdb::logputs stdout "job not ok" @@ -671,11 +676,11 @@ proc need-hosts/host-examine-linux {} { examine-host-examine debian } #---------- builds ---------- -proc need-hosts/build {} { return BUILD } -proc need-hosts/build-kern {} { return BUILD } -proc need-hosts/build-libvirt {} { return BUILD } -proc need-hosts/build-rumprun {} { return BUILD } -proc need-hosts/build-xtf {} { return BUILD } +proc need-hosts/build {} { return BUILD_LINUX } +proc need-hosts/build-kern {} { return BUILD_LINUX } +proc need-hosts/build-libvirt {} { return BUILD_LINUX } +proc need-hosts/build-rumprun {} { return BUILD_LINUX } +proc need-hosts/build-xtf {} { return BUILD_LINUX } proc run-job/build {} { run-ts . = ts-xen-build @@ -702,11 +707,11 @@ proc run-job/build-xtf {} { run-ts . = ts-xtf-build } -proc allocate-build-host {} { +proc allocate-build-host {ostype} { global jobinfo run-ts broken = ts-hosts-allocate + host } -proc prepare-build-host {} { +proc prepare-build-host-linux {} { global jobinfo run-ts broken host-install(*) ts-host-install-twice run-ts . host-build-prep ts-xen-build-prep