From patchwork Tue Mar 11 15:26:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26023 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1029F20068 for ; Tue, 11 Mar 2014 15:28:30 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wo20sf33909360obc.10 for ; Tue, 11 Mar 2014 08:28:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:cc:subject:precedence:list-id:list-unsubscribe :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=1FqsiEccrQWn858V04Vbyc4OPftjVecbSL7/wDch3C0=; b=ai7pVAHPeGX/KwZNK6hKOYD3YE7KoP8gbEqCo4BNLWmF+TwIqqvD0wEaVwMLZVIgHT dNGrBxjql54KmYdQLwxjHFhFTzHc6/6EIS74gtwKODXtV05PX1T67nTHoA9cg/A5Gpk3 nV1s8zTv/7rVEA87oafPiI7vKH5qlWwEcT5BftBYNo7GE5sYc+Ow+hoqIIErscO/Iii2 Y/4Fhzo/d8XGN6kjzNuzMl7RBHvsqbKENWgoDy3BCM5RtTiwuifuNiNQ5PHWjcDpsrxL KdUITLQ2UWdCY0XVUXVQmzO2ONKO+K2WYoiFohnUK3FuEJ9eHccl0QWmZ2mp8P1mmYLn t7kQ== X-Gm-Message-State: ALoCoQnmBUCQ14dO4IRC5jXZA4L9f977OqjhP0aErDL6tSqRgkOBVIpoipOvimFQtyhTo9ERmZra X-Received: by 10.50.115.4 with SMTP id jk4mr10227782igb.1.1394551710317; Tue, 11 Mar 2014 08:28:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.131 with SMTP id z3ls2448160qgd.59.gmail; Tue, 11 Mar 2014 08:28:30 -0700 (PDT) X-Received: by 10.52.107.35 with SMTP id gz3mr27145037vdb.8.1394551710189; Tue, 11 Mar 2014 08:28:30 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id x7si5873919vel.0.2014.03.11.08.28.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Mar 2014 08:28:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id lf12so2905619vcb.25 for ; Tue, 11 Mar 2014 08:28:30 -0700 (PDT) X-Received: by 10.52.113.1 with SMTP id iu1mr687978vdb.35.1394551710033; Tue, 11 Mar 2014 08:28:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp213314vck; Tue, 11 Mar 2014 08:28:29 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr712768vec.15.1394551709587; Tue, 11 Mar 2014 08:28:29 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id tz5si6535112vdc.33.2014.03.11.08.28.29 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Mar 2014 08:28:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WNOZn-0004uc-Ng; Tue, 11 Mar 2014 15:26:43 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WNOZm-0004uU-B4 for xen-devel@lists.xen.org; Tue, 11 Mar 2014 15:26:42 +0000 Received: from [85.158.143.35:27056] by server-3.bemta-4.messagelabs.com id 6B/81-13602-13B2F135; Tue, 11 Mar 2014 15:26:41 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-9.tower-21.messagelabs.com!1394551599!1265328!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19361 invoked from network); 11 Mar 2014 15:26:40 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-9.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 11 Mar 2014 15:26:40 -0000 X-IronPort-AV: E=Sophos;i="4.97,631,1389744000"; d="scan'208";a="108787990" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 11 Mar 2014 15:26:39 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Tue, 11 Mar 2014 11:26:38 -0400 Received: from spare.cam.xci-test.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1WNOZi-0007Sf-3l; Tue, 11 Mar 2014 15:26:38 +0000 From: Ian Campbell To: Date: Tue, 11 Mar 2014 15:26:37 +0000 Message-ID: <1394551597-1197-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 X-DLP: MIA1 Cc: Dario Faggioli , Jim Fehlig , Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST] Add a libvirt build job. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: The ts-libvirt-build, sg-run-job and mfi-common changes have been tested in standalone mode. The remaining changes are intended to introduce a libvirt push gate and have been tested as far as my limited ability to invoke cr-daily-branch by hand is able, but I am sure they are incomplete in some way or other. Actually installing/running the result is left for another day. Signed-off-by: Ian Campbell Cc: Jim Fehlig Cc: Dario Faggioli Reviewed-by: Dario Faggioli Acked-by: Ian Jackson --- ap-common | 5 ++++ ap-fetch-version | 4 +++ ap-fetch-version-old | 5 ++++ ap-print-url | 3 ++ ap-push | 5 ++++ cr-daily-branch | 8 +++++ cri-common | 1 + mfi-common | 10 +++++++ sg-run-job | 5 ++++ ts-libvirt-build | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 130 insertions(+) create mode 100755 ts-libvirt-build diff --git a/ap-common b/ap-common index cb0cfff..73bb90c 100644 --- a/ap-common +++ b/ap-common @@ -33,6 +33,10 @@ : ${TREEVCS_LINUX:=git} +: ${TREE_LIBVIRT:=git://libvirt.org/libvirt.git} +: ${PUSH_TREE_LIBVIRT:=$XENBITS:/home/xen/git/libvirt.git} +: ${TREEVCS_LIBVIRT:=git} + : ${TREE_LINUXFIRMWARE:=git://xenbits.xen.org/osstest/linux-firmware.git} : ${PUSH_TREE_LINUXFIRMWARE:=$XENBITS:/home/osstest/ext/linux-firmware.git} : ${UPSTREAM_TREE_LINUXFIRMWARE:=$GIT_KERNEL_ORG/pub/scm/linux/kernel/git/firmware/linux-firmware.git} @@ -56,6 +60,7 @@ fi : ${LOCALREV_XEN:=daily-cron.$branch} : ${LOCALREV_LINUX:=daily-cron.$branch} +: ${LOCALREV_LIBVIRT:=daily-cron.$branch} : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27} diff --git a/ap-fetch-version b/ap-fetch-version index a0a3b16..142ae5e 100755 --- a/ap-fetch-version +++ b/ap-fetch-version @@ -69,6 +69,10 @@ linuxfirmware) repo_tree_rev_fetch_git linuxfirmware \ $UPSTREAM_TREE_LINUXFIRMWARE master daily-cron.$branch ;; +libvirt) + repo_tree_rev_fetch_git libvirt \ + $TREE_LIBVIRT master $LOCALREV_LIBVIRT + ;; osstest) if [ "x$OSSTEST_USE_HEAD" != xy ] ; then git fetch $HOME/testing.git pretest:ap-fetch >&2 diff --git a/ap-fetch-version-old b/ap-fetch-version-old index 3772891..1f44e2a 100755 --- a/ap-fetch-version-old +++ b/ap-fetch-version-old @@ -27,6 +27,7 @@ select_xenbranch : ${BASE_TAG_LINUX2639:=tested/2.6.39.x} : ${BASE_LOCALREV_LINUX:=daily-cron.$branch.old} +: ${BASE_LOCALREV_LIBVIRT:=daily-cron.$branch.old} : ${BASE_TREE_QEMU_UPSTREAM:=${TREE_QEMU_UPSTREAM/\/staging\//\/}} @@ -73,6 +74,10 @@ linuxfirmware) repo_tree_rev_fetch_git linuxfirmware \ $TREE_LINUXFIRMWARE master daily-cron-old.$branch ;; +libvirt) + repo_tree_rev_fetch_git libvirt \ + $TREE_LIBVIRT master $BASE_LOCALREV_LIBVIRT + ;; osstest) if [ "x$OSSTEST_USE_HEAD" != xy ] ; then git fetch -f $HOME/testing.git incoming:ap-fetch diff --git a/ap-print-url b/ap-print-url index f2812d0..2b55fce 100755 --- a/ap-print-url +++ b/ap-print-url @@ -46,6 +46,9 @@ linux-2.6.39) linuxfirmware) echo $UPSTREAM_TREE_LINUXFIRMWARE ;; +libvirt) + echo $TREE_LIBVIRT + ;; osstest) echo none:; ;; diff --git a/ap-push b/ap-push index dc0a166..af76ecc 100755 --- a/ap-push +++ b/ap-push @@ -32,6 +32,7 @@ select_xenbranch TREE_LINUX=$PUSH_TREE_LINUX TREE_QEMU_UPSTREAM=$XENBITS:/home/xen/git/qemu-upstream-${xenbranch#xen-}.git TREE_XEN=$PUSH_TREE_XEN +TREE_LIBVIRT=$PUSH_TREE_LIBVIRT if info_linux_tree "$branch"; then cd $repos/linux @@ -72,6 +73,10 @@ linux-xen-*) cd $repos/linux git push $TREE_LINUX $revision:refs/heads/$branch ;; +libvirt) + cd $repos/libvirt + git push $TREE_LIBVIRT $revision:master + ;; osstest) git push $HOME/testing.git $revision:incoming git push $XENBITS:/home/xen/git/osstest.git $revision:master diff --git a/cr-daily-branch b/cr-daily-branch index 28ccc7e..12a1ee8 100755 --- a/cr-daily-branch +++ b/cr-daily-branch @@ -133,6 +133,10 @@ if [ "x$REVISION_LINUX_ARM" = x ]; then export REVISION_LINUX_ARM fi fi +if [ "x$REVISION_LIBVIRT" = x ]; then + determine_version REVISION_LIBVIRT libvirt + export REVISION_LIBVIRT +fi if [ "x$REVISION_LINUXFIRMWARE" = x ]; then determine_version REVISION_LINUXFIRMWARE linuxfirmware export REVISION_LINUXFIRMWARE @@ -165,6 +169,10 @@ linuxfirmware) realtree=linuxfirmware NEW_REVISION=$REVISION_LINUXFIRMWARE ;; +libvirt) + realtree=libvirt + NEW_REVISION=$REVISION_LIBVIRT + ;; *) NEW_REVISION='' wantpush=false diff --git a/cri-common b/cri-common index 497d4e3..f472927 100644 --- a/cri-common +++ b/cri-common @@ -42,6 +42,7 @@ select_xenbranch () { linux) tree=linux; xenbranch=xen-unstable ;; linux-*) tree=linux; xenbranch=xen-unstable ;; linuxfirmware) tree=linuxfirmware; xenbranch=xen-unstable ;; + libvirt) tree=libvirt; xenbranch=xen-unstable ;; osstest) tree=osstest; xenbranch=xen-unstable ;; esac if [ "x$tree" = xlinux ]; then diff --git a/mfi-common b/mfi-common index f84ee97..37444b3 100644 --- a/mfi-common +++ b/mfi-common @@ -164,6 +164,16 @@ create_build_jobs () { tree_linuxfirmware=$TREE_LINUXFIRMWARE \ revision_linuxfirmware=$REVISION_LINUXFIRMWARE + ./cs-job-create $flight build-$arch-libvirt build-libvirt \ + arch=$arch \ + tree_xen=$TREE_XEN \ + $RUNVARS $BUILD_RUNVARS $BUILD_LIBVIRT_RUNVARS $arch_runvars \ + $suite_runvars \ + host_hostflags=$build_hostflags \ + buildjob=${bfi}build-$arch \ + tree_libvirt=$TREE_LIBVIRT revision_libvirt=$REVISION_LIBVIRT\ + ${TREEVCS_LIBVIRT:+treevcs_libvirt=}${TREEVCS_LIBVIRT} + case "$arch" in armhf|arm64) continue;; # don't do any other kernel builds esac diff --git a/sg-run-job b/sg-run-job index d894711..e3c6b00 100755 --- a/sg-run-job +++ b/sg-run-job @@ -306,6 +306,7 @@ proc test-guest-nomigr {g} { proc need-hosts/build {} { return BUILD } proc need-hosts/build-kern {} { return BUILD } +proc need-hosts/build-libvirt {} { return BUILD } proc run-job/build {} { run-ts . = ts-xen-build @@ -315,6 +316,10 @@ proc run-job/build-kern {} { run-ts . = ts-kernel-build } +proc run-job/build-libvirt {} { + run-ts . = ts-libvirt-build +} + proc prepare-build-host {} { global jobinfo run-ts broken = ts-hosts-allocate + host diff --git a/ts-libvirt-build b/ts-libvirt-build new file mode 100755 index 0000000..8e3a7aa --- /dev/null +++ b/ts-libvirt-build @@ -0,0 +1,84 @@ +#!/usr/bin/perl +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2009-2014 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +use strict qw(vars); +use DBI; +use Osstest; +use Osstest::TestSupport; + +tsreadconfig(); + +our ($whhost) = @ARGV; +$whhost ||= 'host'; +our $ho= selecthost($whhost); + +my $leaf= "build.$flight.$job"; +my $homedir = get_host_property($ho, 'homedir', '/home/osstest'); +my $builddir= "$homedir/$leaf"; +my $xendist= "$builddir/xendist"; + +my $makeflags= get_host_property($ho, 'build make flags', '-j4'); + +sub checkout () { + target_cmd($ho, "rm -rf $builddir && mkdir $builddir && mkdir $xendist", 600); + + my $path = get_stashed("path_dist", $r{"buildjob"}); + my $distcopy= "$builddir/dist.tar.gz"; + target_putfile_root($ho, 300, $path, $distcopy); + target_cmd_root($ho, "tar -C $xendist -hzxf $distcopy", 300); + + build_clone($ho, 'libvirt', $builddir, 'libvirt'); +} + +sub prep() { + target_install_packages($ho, qw(autoconf automake libtool xsltproc + libxml2-utils libxml2-dev libnl-dev + libdevmapper-dev w3c-dtd-xhtml)); +} + +sub config() { + target_cmd_build($ho, 1000, $builddir, <&1 && touch ../build-ok-stamp) |tee ../log + test -f ../build-ok-stamp + echo ok. +END +} + +sub install() { + target_cmd_build($ho, 300, $builddir, <