From patchwork Tue Jul 25 15:00:32 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: 9862189 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 0F770601A1 for ; Tue, 25 Jul 2017 15:02:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 017FC286D1 for ; Tue, 25 Jul 2017 15:02:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA27428696; Tue, 25 Jul 2017 15:02:40 +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 C9A20286D1 for ; Tue, 25 Jul 2017 15:02:39 +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 1da1KF-00035d-HV; Tue, 25 Jul 2017 15:00:43 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da1KE-00032w-MJ for xen-devel@lists.xenproject.org; Tue, 25 Jul 2017 15:00:42 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id A5/DC-01996-91D57795; Tue, 25 Jul 2017 15:00:41 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRWlGSWpSXmKPExsXitHSDva5kbHm kwZktchbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8asa71MBXcUKhqmmjQwPpDoYuTkkBDwl7h0 Ywk7iM0moCNxce5Oti5GDg4RARWJ23sNQMLMAiESrce+gJUIC0RLzG29wARiswioSkx5+pwRx OYVsJBom3icEWKknsTbiS/AbE4BS4lzrefA6oWAanb3fGCBqBeUODnzCQvEfE2J1u2/2SFseY nmrbOZIeoVJfrnPWCbwMg3C0nLLCQts5C0LGBkXsWoUZxaVJZapGtorJdUlJmeUZKbmJmja2h gqpebWlycmJ6ak5hUrJecn7uJERhoDECwg/HfNs9DjJIcTEqivN90yyOF+JLyUyozEosz4otK c1KLDzHKcHAoSfBujgbKCRalpqdWpGXmAEMeJi3BwaMkwtsPkuYtLkjMLc5Mh0idYjTmmPN7x xcmjlcT/n9jEmLJy89LlRLnjQYpFQApzSjNgxsEi8VLjLJSwryMQKcJ8RSkFuVmlqDKv2IU52 BUEuadBTKFJzOvBG7fK6BTmIBOmTOjFOSUkkSElFQDY9TT8muuFoKNP0+tUHGPkTla7nnUzqO na+m8Kv2F/qpbg3+U3Bf92LTifcGJmPgQduUL+yJf9k7PX7LwpME0FjX1hBOyxSIf5hQpfO2v Fb+qe0Gyd++qB317PQMPrz5T1icsFPl21dWz1kuN07rssk6zbPINu+0k8yTaqvtiRYTb8pb5y rGflFiKMxINtZiLihMBdM9CFMACAAA= X-Env-Sender: prvs=372c1d2af=roger.pau@citrix.com X-Msg-Ref: server-4.tower-206.messagelabs.com!1500994839!104424702!1 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 20045 invoked from network); 25 Jul 2017 15:00:41 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-4.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 25 Jul 2017 15:00:41 -0000 X-IronPort-AV: E=Sophos;i="5.40,411,1496102400"; d="scan'208";a="441232354" From: Roger Pau Monne To: Date: Tue, 25 Jul 2017 16:00:32 +0100 Message-ID: <20170725150032.9225-6-roger.pau@citrix.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) In-Reply-To: <20170725150032.9225-1-roger.pau@citrix.com> References: <20170725150032.9225-1-roger.pau@citrix.com> MIME-Version: 1.0 Cc: Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build 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 And use it in order to install the hosts for the next FreeBSD flight. Note that the anoints are done after the push, but there's a recovery mechanism in case osstest manages to do a successful push, but the artifacts are not anointed for some reason. Osstest will continue to create flights until the revision of the anointed artifacts matches the one pushed to the repository (even if that means running flights with OLD_REVISION == NEW_REVISION). Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Changes since v6: - Use just the branch name for anoint (instead of freebsd-$branch). - Force the creation of flights if the revision of the current anoints don't match OLD_VERSION. - Iterate over the list of current anoints instead of open-coding the arches. - Split the retrieve/anoint code blocks into it's own sections. Changes since v5: - New in this version. --- cr-daily-branch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/cr-daily-branch b/cr-daily-branch index af17ad20..d74f9c33 100755 --- a/cr-daily-branch +++ b/cr-daily-branch @@ -126,6 +126,34 @@ elif [ "x$OSSTEST_NO_BASELINE" != xy ] ; then fi fi +# For convenience set a global variable with the FreeBSD branch +# under test, so that we don't need to repeat this in several +# places +case "$branch" in +freebsd-*) freebsd_branch=${branch#freebsd-} ;; +*) freebsd_branch=master ;; +esac + +case "$branch" in +freebsd-*) + IFS=$'\n' + for anointed in \ + `./mg-anoint list-prepared "freebsd build $freebsd_branch*"`; do + # Check if the anointed version matches OLD_VERSION, + # or else force a new flight, even if OLD_REVISION matches + # NEW_REVISION. + flight_job=`./mg-anoint retrieve "$anointed"` + anointed_revision=`check_tested --flight=${flight_job%% *} \ + --print-revision=$tree` + if [ "x$anointed_revision" != "x$OLD_REVISION" ]; then + skipidentical=false + break + fi + done + unset IFS + ;; +esac + if [ "x$REVISION_XEN" = x ]; then REVISION_XEN="`fetch_version $xenbranch`" export REVISION_XEN @@ -277,6 +305,19 @@ freebsd) ;; esac +IFS=$'\n' +for anointed in \ + `./mg-anoint list-prepared "freebsd build $freebsd_branch*"`; do + # Retrieve previous successful FreeBSD build for each arch. + freebsd_arch=${anointed##* } + freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB" + if [ "x${!freebsd_envvar}" = "x" ]; then + flight_job=`./mg-anoint retrieve "$anointed"` + export ${freebsd_envvar}=${flight_job/ /.} + fi +done +unset IFS + if [ "x$OLD_REVISION" = xdetermine-late ]; then OLD_REVISION="`\ $AP_FETCH_PFX ./ap-fetch-version-baseline-late $branch $NEW_REVISION`" @@ -476,6 +517,33 @@ else echo fi +# Do the anoints after the push: if for some reason this fails, +# and osstest ends up with a pushed revision that doesn't match +# the latest anointed artifact a new flight will be run regardless +# of whether OLD_REVISION == NEW_REVISION. +case "$branch" in +freebsd-*) + if grep '^tolerable$' $mrof >/dev/null 2>&1 && $OSSTEST_ANOINT && + [ "x$OSSTEST_BLESSING" == "xreal" ]; then + IFS=$'\n' + for anointed in `./mg-anoint list-prepared \ + "freebsd build $freebsd_branch*"`; do + # Update anointed versions + # NB: failure to update an anointed build for a specific arch + # should not be fatal, and it's not an issue if one of the + # arches gets slightly out of sync with the other ones. + freebsd_arch=${anointed##* } + if ./mg-anoint anoint \ + "freebsd build $freebsd_branch $freebsd_arch" \ + $flight build-$freebsd_arch-freebsd; then + echo "Anointed artifacts from build-$freebsd_arch-freebsd" + fi + done + unset IFS + fi + ;; +esac + if [ -f $revlog ]; then revlog_lines=`wc -l <$revlog` if [ $revlog_lines -lt 300 ]; then