From: Roger Pau Monne Date: Fri, 29 Jun 2018 10:09:37 +0000 (+0200) Subject: osstest: add FreeBSD Xen build job X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Ffreebsd_xen_build.wip3;p=people%2Froyger%2Fosstest.git 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_ovmf false +build-amd64-xen-xsm-freebsd enable_ovmf false +build-amd64-xen-freebsd enable_xend false +build-amd64-xen-xsm-freebsd enable_xend false +build-amd64-xen-freebsd enable_xsm false +build-amd64-xen-xsm-freebsd enable_xsm true +build-amd64-xen-freebsd freebsdbuildjob 125104.build-amd64-freebsd +build-amd64-xen-xsm-freebsd freebsdbuildjob 125104.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_minios +build-amd64-xen-xsm-freebsd revision_minios +build-amd64-xen-freebsd revision_ovmf +build-amd64-xen-xsm-freebsd revision_ovmf +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_minios +build-amd64-xen-xsm-freebsd tree_minios +build-amd64-xen-freebsd tree_ovmf +build-amd64-xen-xsm-freebsd tree_ovmf +build-amd64-xen-freebsd tree_qemu git://xenbits.xen.org/qemu-xen-traditional.git +build-amd64-xen-xsm-freebsd tree_qemu git://xenbits.xen.org/qemu-xen-traditional.git +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é --- 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. - Introduce a create_xen_build_job helper. --- diff --git a/make-freebsd-flight b/make-freebsd-flight index 6c530eb..d3c413b 100755 --- a/make-freebsd-flight +++ b/make-freebsd-flight @@ -46,6 +46,12 @@ 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_xen_build_job build-$arch-xen-freebsd build-xen-freebsd \ + host_hostflags=arch-$arch,purpose-build all_host_os=freebsd \ + $freebsd_runvars done echo $flight diff --git a/mfi-common b/mfi-common index b5af177..75336e0 100644 --- a/mfi-common +++ b/mfi-common @@ -235,6 +235,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 " @@ -245,6 +246,8 @@ create_build_jobs () { if [ "x$arch" = xdisable ]; then continue; fi + set_freebsd_runvars + build_matrix_branch_filter_callback || continue case "$arch" in @@ -321,6 +324,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 @@ -346,6 +356,12 @@ create_build_jobs () { fi create_xen_build_job build-$arch$xsm_suffix build \ $hostos_runvars host_hostflags=$build_hostflags + if [ x$arch = xamd64 ] && [ x$build_on_freebsd = xtrue ] ; then + # OVMF doesn't compile on FreeBSD ATM, so forcefully disable it. + create_xen_build_job build-$arch-xen$xsm_suffix-freebsd \ + build-xen-freebsd host_hostflags=arch-$arch,purpose-build \ + all_host_os=freebsd $freebsd_runvars enable_ovmf=false + fi done if [ x$want_prevxen = xy ] ; then diff --git a/sg-run-job b/sg-run-job index d152051..bbfe3f5 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 3999ed7..e3220fa 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 0000000..55f513e --- /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 . + +set -ex +./ts-xen-build "$@" -- clang=y SEABIOSCC=gcc SEABIOSLD=/usr/local/bin/ld