[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 6/6] osstest: add FreeBSD Xen build job



To both the FreeBSD and the xen-unstable flights.

This is the runvar difference of a xen-unstable flight:

+build-amd64-xen-freebsd     all_host_os      freebsd
+build-amd64-xen-xsm-freebsd all_host_os      freebsd
+build-amd64-xen-freebsd     all_hostflags    PropEq:Firmware:bios:bios
+build-amd64-xen-xsm-freebsd all_hostflags    PropEq:Firmware:bios:bios
+build-amd64-xen-freebsd     arch             amd64
+build-amd64-xen-xsm-freebsd arch             amd64
+build-amd64-xen-freebsd     enable_livepatch true
+build-amd64-xen-xsm-freebsd enable_livepatch true
+build-amd64-xen-freebsd     enable_xsm       false
+build-amd64-xen-xsm-freebsd enable_xsm       true
+build-amd64-xen-freebsd     freebsdbuildjob  124954.build-amd64-freebsd
+build-amd64-xen-xsm-freebsd freebsdbuildjob  124954.build-amd64-freebsd
+build-amd64-xen-freebsd     host_hostflags   arch-amd64,purpose-build
+build-amd64-xen-xsm-freebsd host_hostflags   arch-amd64,purpose-build
+build-amd64-xen-freebsd     revision_qemu
+build-amd64-xen-xsm-freebsd revision_qemu
+build-amd64-xen-freebsd     revision_qemuu
+build-amd64-xen-xsm-freebsd revision_qemuu
+build-amd64-xen-freebsd     revision_seabios
+build-amd64-xen-xsm-freebsd revision_seabios
+build-amd64-xen-freebsd     revision_xen
+build-amd64-xen-xsm-freebsd revision_xen
+build-amd64-xen-freebsd     tree_qemuu       git://xenbits.xen.org/qemu-xen.git
+build-amd64-xen-xsm-freebsd tree_qemuu       git://xenbits.xen.org/qemu-xen.git
+build-amd64-xen-freebsd     tree_seabios
+build-amd64-xen-xsm-freebsd tree_seabios
+build-amd64-xen-freebsd     tree_xen         git://xenbits.xen.org/xen.git
+build-amd64-xen-xsm-freebsd tree_xen         git://xenbits.xen.org/xen.git

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v1:
 - Fix enabling of FreeBSD Xen buildjob based on branch.
 - Introduce a helper to add the FreeBSD Xen build jobs.
 - Introduce the ts-xen-build-freebsd wrapper around ts-xen-build for
   FreeBSD.
---
 make-freebsd-flight   |  4 ++++
 mfi-common            | 29 +++++++++++++++++++++++++++++
 sg-run-job            |  5 +++++
 ts-build-prep-freebsd |  5 ++++-
 ts-xen-build-freebsd  | 19 +++++++++++++++++++
 5 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100755 ts-xen-build-freebsd

diff --git a/make-freebsd-flight b/make-freebsd-flight
index 6c530ebe..663c4f04 100755
--- a/make-freebsd-flight
+++ b/make-freebsd-flight
@@ -46,6 +46,10 @@ for arch in "$arches"; do
     freebsd_runvars="$freebsd_runvars freebsdbuildjob=build-$arch-freebsd \
                      recipe_testinstall=true"
     create_freebsd_build_job build-$arch-freebsd-again
+
+    # Create a Xen build job that's going to use the output from the first
+    # FreeBSD build job.
+    create_freebsd_xen_build_job
 done
 
 echo $flight
diff --git a/mfi-common b/mfi-common
index c67686dd..5896654e 100644
--- a/mfi-common
+++ b/mfi-common
@@ -196,6 +196,22 @@ create_freebsd_build_job () {
     $freebsd_runvars
 }
 
+create_freebsd_xen_build_job () {
+  job_create_build build-$arch-xen$xsm_suffix-freebsd build-xen-freebsd    \
+    arch=$arch                                                             \
+    enable_xsm=$enable_xsm $livepatch_runvars                              \
+    tree_qemuu=$TREE_QEMU_UPSTREAM                                         \
+    tree_xen=$TREE_XEN                                                     \
+    tree_seabios=$TREE_SEABIOS                                             \
+    $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars               \
+    host_hostflags=arch-$arch,purpose-build                                \
+    revision_xen=$REVISION_XEN                                             \
+    revision_qemu=$REVISION_QEMU                                           \
+    revision_qemuu=$REVISION_QEMU_UPSTREAM                                 \
+    revision_seabios=$REVISION_SEABIOS                                     \
+    all_host_os=freebsd $freebsd_runvars
+}
+
 create_build_jobs () {
 
   local arch
@@ -205,6 +221,7 @@ create_build_jobs () {
   local enable_ovmf
   local build_hostflags
   local livepatch_runvars
+  local freebsd_runvars build_on_freebsd
 
   if [ "x$BUILD_LVEXTEND_MAX" != x ]; then
      BUILD_RUNVARS+=" build_lvextend_max=$BUILD_LVEXTEND_MAX "
@@ -215,6 +232,8 @@ create_build_jobs () {
 
     if [ "x$arch" = xdisable ]; then continue; fi
 
+    set_freebsd_runvars
+
     build_matrix_branch_filter_callback || continue
 
     case "$arch" in
@@ -291,6 +310,13 @@ create_build_jobs () {
     esac
     enable_prevovmf=${enable_prevovmf:-$enable_ovmf}
 
+    case "$xenbranch" in
+    xen-3.*-testing)  build_on_freebsd=false;;
+    xen-4.?-testing)  build_on_freebsd=false;;
+    xen-4.11-testing) build_on_freebsd=false;;
+    *)                build_on_freebsd=true;;
+    esac
+
     want_prevxen=n
     if branch_wants_migrupgrade_tests ; then
         # Only x86 for now
@@ -332,6 +358,9 @@ create_build_jobs () {
                 revision_seabios=$REVISION_SEABIOS                           \
                 revision_ovmf=$REVISION_OVMF                                 \
                 revision_minios=$REVISION_MINIOS
+      if [ x$arch = xamd64 ] && [ x$build_on_freebsd = xtrue ] ; then
+        create_freebsd_xen_build_job
+      fi
     done
 
     if [ x$want_prevxen = xy ] ; then
diff --git a/sg-run-job b/sg-run-job
index d152051f..bbfe3f5b 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -712,6 +712,7 @@ proc need-hosts/build-libvirt {}        { return 
BUILD_LINUX }
 proc need-hosts/build-rumprun {}        { return BUILD_LINUX }
 proc need-hosts/build-xtf {}            { return BUILD_LINUX }
 proc need-hosts/build-freebsd {}        { return BUILD_FREEBSD }
+proc need-hosts/build-xen-freebsd {}    { return BUILD_FREEBSD }
 
 proc run-job/build {} {
     run-ts . = ts-xen-build
@@ -742,6 +743,10 @@ proc run-job/build-freebsd {} {
     run-ts . = ts-freebsd-build
 }
 
+proc run-job/build-xen-freebsd {} {
+    run-ts . = ts-xen-build-freebsd + host
+}
+
 proc allocate-build-host {ostype} {
     global jobinfo
     switch -exact $ostype {
diff --git a/ts-build-prep-freebsd b/ts-build-prep-freebsd
index 3999ed79..e3220fa8 100755
--- a/ts-build-prep-freebsd
+++ b/ts-build-prep-freebsd
@@ -31,7 +31,10 @@ our $ho= selecthost($whhost);
 exit 0 if $ho->{SharedReady};
 
 sub install_deps () {
-    target_install_packages($ho, qw(git));
+    my @packages = qw(git glib pkgconf yajl gmake pixman markdown gettext
+                      python argp-standalone lzo2 git gcc binutils);
+
+    target_install_packages($ho, @packages);
 }
 
 install_deps();
diff --git a/ts-xen-build-freebsd b/ts-xen-build-freebsd
new file mode 100755
index 00000000..55f513e5
--- /dev/null
+++ b/ts-xen-build-freebsd
@@ -0,0 +1,19 @@
+#!/bin/sh
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2018 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/>.
+
+set -ex
+./ts-xen-build "$@" -- clang=y SEABIOSCC=gcc SEABIOSLD=/usr/local/bin/ld
-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.