xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 11/13] rump kernels: Provide a build job
Date: Fri, 16 May 2014 19:01:38 +0100	[thread overview]
Message-ID: <1400263300-22903-12-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com>

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 <Ian.Jackson@eu.citrix.com>
---
 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 <http://www.gnu.org/licenses/>.
+
+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 (<EI>) {
+	    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 (<EI>) {
+	    s/^XEN_HEADERS=/XEN_HEADERS?=/;
+	    print EO or die $!;
+	}
+    });
+}
+
+sub build() {
+    target_cmd_build($ho, 3600, $rux, <<END);
+        export XEN_HEADERS=$xendist/usr/local/include/xen
+        (./buildxen.sh && touch ../build-ok-stamp) |tee ../log
+        test -f ../build-ok-stamp #/
+        echo ok.
+END
+}
+
+sub install() {
+    my $destdir="dist/usr/local/lib/xen/rump-kernel";
+    target_cmd_build($ho, 300, $builddir, <<END);
+        mkdir -p $destdir
+        cp rumpuserxen/rump-kernel* $destdir
+        cp -r rumpuserxen/img $destdir/
+        cp rumpuserxen/domain_config $destdir
+END
+}
+
+checkout();
+massage();
+build();
+install();
+built_stash($ho, $builddir, 'dist', 'rumpuserxendist');
-- 
1.7.10.4

  parent reply	other threads:[~2014-05-16 18:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 18:01 [OSSTEST PATCH 00/13] Test rump kernels Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 01/13] TestSupport: Provide target_editfile Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 02/13] git_massage_url: Make idempotent Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 03/13] BuildSupport, ts-*-build: Remove some clone-and-hack Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 04/13] BuildSupport: Provide some support for git submodules Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 05/13] TestSupport: Break out target_jobdir Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 06/13] TestSupport: Break out target_extract_jobdistpath_subdir Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 07/13] target_jobdir: Create the directory Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 08/13] guest_umount_lv: Tolerate lack of volume group Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 09/13] prepareguest: Tolerate $mb=undef Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 10/13] mfi-common: Honour REVISION_LIBVIRT=disable Ian Jackson
2014-05-16 18:01 ` Ian Jackson [this message]
2014-05-16 18:01 ` [OSSTEST PATCH 12/13] rump kernels: Provide two test jobs Ian Jackson
2014-05-16 18:01 ` [OSSTEST PATCH 13/13] rump kernels: Create a "branch" for rump kernel tests Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400263300-22903-12-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).