From patchwork Tue Jan 19 12:48:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 8061321 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4A0FABEEE5 for ; Tue, 19 Jan 2016 12:51:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 43DFE20392 for ; Tue, 19 Jan 2016 12:51:02 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 557EC2026D for ; Tue, 19 Jan 2016 12:51:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLVhn-0003uU-15; Tue, 19 Jan 2016 12:48:15 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLVhl-0003uD-JC for xen-devel@lists.xen.org; Tue, 19 Jan 2016 12:48:13 +0000 Received: from [193.109.254.147] by server-12.bemta-14.messagelabs.com id FD/E8-09834-C803E965; Tue, 19 Jan 2016 12:48:12 +0000 X-Env-Sender: prvs=8191aee2d=Ian.Campbell@citrix.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1453207690!17809738!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38439 invoked from network); 19 Jan 2016 12:48:11 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-9.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 19 Jan 2016 12:48:11 -0000 X-IronPort-AV: E=Sophos;i="5.22,317,1449532800"; d="scan'208";a="326108211" From: Ian Campbell To: , Date: Tue, 19 Jan 2016 12:48:08 +0000 Message-ID: <1453207688-8337-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.6.1 MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell Subject: [Xen-devel] [PATCH OSSTEST v2] make-flight: Support specifying a mini-os tree+revision X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is useful for standalone or adhoc use as well as (presumably) bisection. There is no ap-* or cr-daily-* integration here because I didn't need it (i.e. I'm not intending to create a new mini-os branch here). In order to cope with Xen <= 4.5 where extras/mini-os exists but is part of xen.git and not something cloned from elsewhere add a $optional argument (itself optional) to dir_identify_vcs which if true causes dir_identify_vcs to return 'none' instead of failing. Previously dir_identify_vcs failed with: bash: line 5: fail: command not found because the fail command is undefined. Instead echo fail and use that to trigger the $optional handling. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- v2: Adjust dir_identify_vcs handling of an unknown vcs --- Osstest/TestSupport.pm | 13 ++++++++----- mfi-common | 4 +++- ts-xen-build | 8 ++++++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 9a90c2e..2141905 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1319,21 +1319,24 @@ END store_vcs_revision($which, $rev, $vcs); } -sub dir_identify_vcs ($$) { - my ($ho,$dir) = @_; - return target_cmd_output($ho, <&2 'unable to determine vcs'; fail) + (echo >&2 'unable to determine vcs'; echo fail) END + die "unable to determine vcs" if !$optional && $vcs eq 'fail'; + $vcs = 'none' if $vcs eq 'fail'; + return $vcs; } sub store_revision ($$$;$) { my ($ho,$which,$dir,$optional) = @_; - my $vcs= dir_identify_vcs($ho,$dir); + my $vcs= dir_identify_vcs($ho,$dir,$optional); return if $optional && $vcs eq 'none'; my $rev= vcs_dir_revision($ho,$dir,$vcs); store_vcs_revision($which,$rev,$vcs); diff --git a/mfi-common b/mfi-common index b739c7d..a705573 100644 --- a/mfi-common +++ b/mfi-common @@ -191,6 +191,7 @@ create_build_jobs () { tree_xen=$TREE_XEN \ tree_seabios=$TREE_SEABIOS \ tree_ovmf=$TREE_OVMF \ + tree_minios=$TREE_MINIOS \ $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars \ $suite_runvars \ host_hostflags=$build_hostflags \ @@ -198,7 +199,8 @@ create_build_jobs () { revision_qemu=$REVISION_QEMU \ revision_qemuu=$REVISION_QEMU_UPSTREAM \ revision_seabios=$REVISION_SEABIOS \ - revision_ovmf=$REVISION_OVMF + revision_ovmf=$REVISION_OVMF \ + revision_minios=$REVISION_MINIOS done if [ x$want_prevxen = xy ] ; then diff --git a/ts-xen-build b/ts-xen-build index bc4e41a..8f92729 100755 --- a/ts-xen-build +++ b/ts-xen-build @@ -85,6 +85,12 @@ END (nonempty($r{revision_ovmf}) ? <>.config OVMF_UPSTREAM_REVISION='$r{revision_ovmf}' END + (nonempty($r{tree_minios}) ? <>.config MINIOS_UPSTREAM_URL='$r{tree_minios}' +END + (nonempty($r{revision_minios}) ? <>.config MINIOS_UPSTREAM_REVISION='$r{revision_minios}' +END (nonempty($earlyprintk) ? <>.config CONFIG_EARLY_PRINTK=$earlyprintk END @@ -147,11 +153,13 @@ END sub collectversions () { my $tools="$builddir/xen/tools"; + my $extras="$builddir/xen/extras"; store_revision($ho, 'qemu', "$tools/ioemu-dir", 1); store_revision($ho, 'qemu', "$tools/qemu-xen-traditional-dir", 1); store_revision($ho, 'qemuu', "$tools/qemu-xen-dir", 1); store_revision($ho, 'seabios', "$tools/firmware/seabios-dir", 1); store_revision($ho, 'ovmf', "$tools/firmware/ovmf-dir", 1); + store_revision($ho, 'minios', "$extras/mini-os", 1); } sub divide () {