From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 11/13] rump kernels: Provide a build job Date: Fri, 16 May 2014 19:01:38 +0100 Message-ID: <1400263300-22903-12-git-send-email-ian.jackson@eu.citrix.com> References: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WlMSh-0002FR-Dw for xen-devel@lists.xenproject.org; Fri, 16 May 2014 18:02:27 +0000 In-Reply-To: <1400263300-22903-1-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: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Provide: - test script ts-rumpuserxen-build - recipe build-rumpuserxen - in flights, job build-i386-rumpuserxen - in ap-common, TREE and TREEVCS for RUMPUSERXEN and RUMPUSERXEN_RUMPSRC mfi-common also honours REVISION_RUMPUSERXEN, but provides no way to specify the revisions of the subtrees (the two submodules and rumpsrc). The upstream rumpuser-xen git repository contains the commit hashes of those. We had to do some pretty unpleasant things to get the rumpuser-xen build system to work with rumpsrc we cloned ourselves. During bisection the bisector must choose a unification of the various trees' revision graphs, into a single graph. But we do not here teach adhoc-revtuple-generator about these interrelationships. As a result the bisector may choose a unification inconsistent with the subtree references in rumpuser-xen.git. This might impair the performance of the bisector in the presence of cross-tree version incompatibilities, but the results should be tolerable for now. Signed-off-by: Ian Jackson --- ap-common | 6 +++ mfi-common | 17 +++++++++ sg-run-job | 5 +++ ts-rumpuserxen-build | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100755 ts-rumpuserxen-build diff --git a/ap-common b/ap-common index 4cae650..d7933f1 100644 --- a/ap-common +++ b/ap-common @@ -41,6 +41,12 @@ : ${TREE_GNULIB_LIBVIRT:=git://git.sv.gnu.org/gnulib.git} : ${TREEVCS_GNULIB_LIBVIRT:=git} +: ${TREE_RUMPUSERXEN:=https://github.com/rumpkernel/rumpuser-xen} +: ${TREEVCS_RUMPUSERXEN:=git} + +: ${TREE_RUMPUSERXEN_RUMPSRC:=https://github.com/rumpkernel/rumpkernel-netbsd-src} +: ${TREEVCS_RUMPUSERXEN_RUMPSRC:=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} diff --git a/mfi-common b/mfi-common index ae42637..7c5f301 100644 --- a/mfi-common +++ b/mfi-common @@ -178,6 +178,23 @@ create_build_jobs () { fi + case $arch in + i386) + ./cs-job-create $flight build-$arch-rumpuserxen build-rumpuserxen \ + arch=$arch \ + tree_xen=$TREE_XEN \ + $RUNVARS $BUILD_RUNVARS $BUILD_RUMPUSERXEN_RUNVARS $arch_runvars \ + $suite_runvars \ + host_hostflags=$build_hostflags \ + buildjob=${bfi}build-$arch \ + tree_rumpuserxen=$TREE_RUMPUSERXEN \ + ${TREEVCS_RUMPUSERXEN:+treevcs_rumpuserxen=}${TREEVCS_RUMPUSERXEN} \ + revision_rumpuserxen=$REVISION_RUMPUSERXEN \ + tree_rumpuserxen_rumpsrc=$TREE_RUMPUSERXEN_RUMPSRC \ + ${TREEVCS_RUMPUSERXEN_RUMPSRC:+treevcs_rumpuserxen_rumpsrc=}${TREEVCS_RUMPUSERXEN_RUMPSRC} + ;; + esac + case "$arch" in armhf) continue;; # don't do any other kernel builds esac diff --git a/sg-run-job b/sg-run-job index 3d44331..c71b84e 100755 --- a/sg-run-job +++ b/sg-run-job @@ -313,6 +313,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 need-hosts/build-rumpuserxen {} { return BUILD } proc run-job/build {} { run-ts . = ts-xen-build @@ -326,6 +327,10 @@ proc run-job/build-libvirt {} { run-ts . = ts-libvirt-build } +proc run-job/build-rumpuserxen {} { + run-ts . = ts-rumpuserxen-build +} + proc prepare-build-host {} { global jobinfo run-ts broken = ts-hosts-allocate + host diff --git a/ts-rumpuserxen-build b/ts-rumpuserxen-build new file mode 100755 index 0000000..e6adc75 --- /dev/null +++ b/ts-rumpuserxen-build @@ -0,0 +1,104 @@ +#!/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; +use Osstest::BuildSupport; + +tsreadconfig(); +selectbuildhost(@ARGV); +builddirsprops(); + +our %submodmap = qw(nblibs nblibs + buildrump.sh buildrumpsh); + +our ($rux); + +sub checkout () { + prepbuilddirs(); + xendist(); + + build_clone($ho, 'rumpuserxen', $builddir, 'rumpuserxen'); + submodulefixup($ho, 'rumpuserxen', 'rumpuserxen', \%submodmap); + $rux = "$builddir/rumpuserxen"; + + my $rumpsrcgitrevr = "$rux/buildrump.sh/.srcgitrev"; + my $rumpsrcgitrevl = "buildrump-srcgitrev"; + my $rev = $r{revision_rumpuserxen_rumpsrc}; + if (length $rev) { + target_putfilecontents_stash($ho,30, + "$r{revision_rumpuserxen_rumpsrc}\n", + $rumpsrcgitrevr, $rumpsrcgitrevl); + } else { + target_getfile($ho,30,$rumpsrcgitrevr,"$stash/$rumpsrcgitrevl"); + $rev = get_filecontents("$stash/$rumpsrcgitrevl"); + chomp $rev or die; + $rev =~ m/^[0-9a-f]+$/ or die; + store_runvar('revision_rumpuserxen_rumpsrc', $rev); + } + + build_clone($ho, "rumpuserxen_rumpsrc", $builddir, "rumpuserxen/rumpsrc"); + store_vcs_revision('rumpuserxen_rumpsrc', $rev, 'git'); +} + +sub massage() { + # Very poor + target_editfile($ho, "$rux/buildxen.sh", undef, + "$rux/grievous-bodge-nblibs", sub { + while () { + next unless m/^\Qif [ ! -d rumpsrc ]; then\E/..m/^fi/; + next unless m/cp -Rp nblibs/; + print EO or die $!; + } + }); + target_cmd_build($ho, 200, $rux, "bash -x grievous-bodge-nblibs"); + + # Rather poor + target_editfile($ho, "$rux/Config.mk", sub { + while () { + s/^XEN_HEADERS=/XEN_HEADERS?=/; + print EO or die $!; + } + }); +} + +sub build() { + target_cmd_build($ho, 3600, $rux, <