--- /dev/null
+#!/bin/bash
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2017 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 -e -o posix
+
+branch=$1
+xenbranch=$2
+hostflags=$3
+blessing=$4
+buildflight=$5
+
+: ${ALL_ARCHES:=amd64 i386 arm64 armhf}
+: ${ALL_SUITES:=jessie stretch}
+
+flight=`./cs-flight-create $blessing $branch`
+
+. ./cri-common
+. ./ap-common
+. ./mfi-common
+
+defsuite=`getconfig DebianSuite`
+
+job_create_build_filter_callback () {
+ local job=$1; shift
+
+ case "$job" in
+ build-*-libvirt) return 1;;
+ esac
+ case " $* " in
+ *" enable_xsm=true "*) return 1;;
+ esac
+ return 0
+}
+
+build_matrix_branch_filter_callback () {
+ :
+}
+
+hosts_iterate () {
+ ./cs-hosts-list --arches=${ALL_ARCHES// /,} \
+ --suites=${ALL_SUITES// /,} \
+ $hostflags >tmp/$flight.hosts-list
+ exec 3<tmp/$flight.hosts-list
+
+ while read <&3 host kern arch suite; do
+ runvars="
+ arch=$arch host=$host
+ "
+
+ case $kern in
+ xen|linux)
+ local di_version=`getconfig_TftpDiVersion_suite $suite`
+ runvars+="
+ kernkind=pvops
+ all_host_di_version=$di_version
+ all_host_suite=$suite
+ "
+ ;;
+ esac
+
+ case $kern in
+ xen)
+ runvars+="
+ enable_xsm=false
+ buildjob=${bfi}build-$arch
+ xenbuildjob=${bfi}build-$arch
+ kernbuildjob=${bfi}build-$arch-pvops
+ toolstack=xl
+ "
+ ;;
+ esac
+
+ ./cs-job-create $flight examine-$host host-examine-$kern $runvars
+ done
+}
+
+if [ x$buildflight = x ]; then
+
+ WANT_XEND=false REVISION_LINUX_OLD=disable
+
+ create_build_jobs
+
+else
+
+ bfi=$buildflight.
+
+fi
+
+hosts_iterate
+
+echo $flight
+
+# Local variables:
+# mode: sh
+# sh-basic-offset: 2
+# indent-tabs-mode: nil
+# End:
source sg-run-job-adhoc
}
+#---------- host examination recipes ----------
+
+proc examine-host-install-debian {} {
+ run-ts broken = ts-hosts-allocate + host
+ run-ts broken host-install ts-host-install-twice + host
+}
+proc examine-host-install-xen {} {
+ examine-host-install-debian
+ run-ts . = ts-xen-install + host
+ # examine-hosts-examine will do reboot
+}
+
+proc examine-host-examine {install} {
+ catching-otherwise fail {
+ examine-host-install-$install
+ run-ts . reboot ts-host-reboot + host
+ }
+ run-ts !broken capture-logs ts-logs-capture + host
+}
+
+proc need-hosts/host-examine-xen {} { return {} }
+proc run-job/host-examine-xen {} {
+ examine-host-examine xen
+}
+
+proc need-hosts/host-examine-linux {} { return {} }
+proc need-hosts/host-examine-linux {} {
+ examine-host-examine debian
+}
+
#---------- builds ----------
proc need-hosts/build {} { return BUILD }