]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
osstest: hook FreeBSD flight into cr-daily-branch
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 13 Jun 2018 07:40:17 +0000 (09:40 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 21 Jun 2018 15:56:55 +0000 (16:56 +0100)
Add the missing pieces so that cr-daily-branch knows how to create a
FreeBSD flight. This has been tested by calling `./cr-daily-branch
freebsd-master`.

Note that there are two missing pieces. The first one is correctly
setting the FREEBSD_<arch>_BUILDJOB environment variable when calling
make-freebsd-flight, without it the installer media will always be
picked from the configuration file. This requires keeping track of
previous FreeBSD successful build jobs, marking them as permanent and
fetching them from the database in order to pass them on the env
variable.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v8.1:  fix ap-fetch-version-old for the freebsd-* branch
       (The remote branch has been changed to tested/master or
       tested/stable/<version> instead of plain master or stable/11.)

Changes since v6:
 - Set the path to the FreeBSD git trees in this patch.
 - Push to tested/master or tested/stable/<version> instead of using
   the same branches as the origin tree.

Changes since v5:
 - Add support for testing multiple FreeBSD branches, default to
   branch master.

Changes since v3:
 - Fix the daily-cron-email-* settings for FreeBSD branch flights.

ap-common
ap-fetch-version
ap-fetch-version-old
ap-print-url
ap-push
cr-daily-branch
cr-for-branches
cri-common
daily-cron-email-adhoc--freebsd-master [new file with mode: 0644]
daily-cron-email-play--freebsd-master [new file with mode: 0644]
daily-cron-email-real--freebsd-master [new file with mode: 0644]

index a967ac648cb44d45884f09796dd022a896a20298..87df7948d20245b094a701b4f142e8aca79ef438 100644 (file)
--- a/ap-common
+++ b/ap-common
 : ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/xtf.git}
 : ${BASE_TREE_XTF:=git://xenbits.xen.org/xtf.git}
 
+: ${TREE_FREEBSD:=git://github.com/freebsd/freebsd.git}
+: ${PUSH_TREE_FREEBSD:=$XENBITS:/home/xen/git/freebsd.git}
+: ${BASE_TREE_FREEBSD:=git://xenbits.xen.org/freebsd.git}
+
 : ${TREE_LIBVIRT:=git://libvirt.org/libvirt.git}
 : ${PUSH_TREE_LIBVIRT:=$XENBITS:/home/xen/git/libvirt.git}
 : ${BASE_TREE_LIBVIRT:=git://xenbits.xen.org/libvirt.git}
@@ -83,6 +87,7 @@ fi
 : ${LOCALREV_SEABIOS:=daily-cron.$branch}
 : ${LOCALREV_OVMF:=daily-cron.$branch}
 : ${LOCALREV_XTF:=daily-cron.$branch}
+: ${LOCALREV_FREEBSD:=daily-cron.$branch}
 
 : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27}
 
index a107c93da6a4d6d95f8e030aac05447826bdbb44..87725bf08472fe5c045b13ba7ba8f15a39b88734 100755 (executable)
@@ -106,6 +106,14 @@ ovmf)
        repo_tree_rev_fetch_git ovmf \
                $TREE_OVMF_UPSTREAM master $LOCALREV_OVMF
        ;;
+freebsd-*)
+       branchcore=${branch#freebsd-}
+       if [ "x$branchcore" != "xmaster" ]; then
+               branchcore="stable/$branchcore"
+       fi
+       repo_tree_rev_fetch_git freebsd \
+               $TREE_FREEBSD $branchcore $LOCALREV_FREEBSD
+       ;;
 osstest)
         if [ "x$OSSTEST_USE_HEAD" = "xy" ] ; then
            git update-ref -m "Arranging to test HEAD" \
index 3cbc17681a493cb096fb90e291a4ee99e1f2bc74..18213e011a635f589efc2a0cb1cfbaeef33cd645 100755 (executable)
@@ -34,6 +34,7 @@ check_ap_fetch_placeholders
 : ${BASE_LOCALREV_SEABIOS:=daily-cron.$branch.old}
 : ${BASE_LOCALREV_XTF:=daily-cron.$branch.old}
 : ${BASE_LOCALREV_OVMF:=daily-cron.$branch.old}
+: ${BASE_LOCALREV_FREEBSD:=daily-cron.$branch.old}
 : ${BASE_TAG_LIBVIRT:=xen-tested-master}
 
 if info_linux_tree "$branch"; then
@@ -114,6 +115,14 @@ ovmf)
        repo_tree_rev_fetch_git ovmf \
                $BASE_TREE_OVMF xen-tested-master $BASE_LOCALREV_OVMF
        ;;
+freebsd-*)
+       branchcore=${branch#freebsd-}
+       if [ "x$branchcore" != "xmaster" ]; then
+               branchcore="stable/$branchcore"
+       fi
+       repo_tree_rev_fetch_git freebsd \
+               $BASE_TREE_FREEBSD tested/$branchcore $BASE_LOCALREV_FREEBSD
+       ;;
 osstest)
        if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then
            git fetch -f $HOME/testing.git production:ap-fetch
index 93c14b35c9cc3bbaff0a17eb7ac91166ce6e811b..e9934bc05f2a10800d0e632e2917ec63b7fdec81 100755 (executable)
@@ -64,6 +64,9 @@ xtf)
 ovmf)
        echo $TREE_OVMF_UPSTREAM
        ;;
+freebsd-*)
+       echo $TREE_FREEBSD
+       ;;
 osstest)
        echo none:;
        ;;
diff --git a/ap-push b/ap-push
index 6c95b1f5d4a44447e24b9c96083242a04c31d256..ded33f6396c2b7f08a0a9a9e030f9e18295b8e72 100755 (executable)
--- a/ap-push
+++ b/ap-push
@@ -41,6 +41,7 @@ TREE_RUMPRUN=$PUSH_TREE_RUMPRUN
 TREE_SEABIOS=$PUSH_TREE_SEABIOS
 TREE_OVMF=$PUSH_TREE_OVMF
 TREE_XTF=$PUSH_TREE_XTF
+TREE_FREEBSD=$PUSH_TREE_FREEBSD
 
 if info_linux_tree "$branch"; then
        cd $repos/linux
@@ -125,6 +126,14 @@ xtf)
        cd $repos/xtf
        git push $TREE_XTF $revision:refs/heads/xen-tested-master
        ;;
+freebsd-*)
+       branchcore=${branch#freebsd-}
+       if [ "x$branchcore" != "xmaster" ]; then
+               branchcore="stable/$branchcore"
+       fi
+       cd $repos/freebsd
+       git push $TREE_FREEBSD $revision:refs/heads/tested/$branchcore
+       ;;
 ovmf)
        cd $repos/ovmf
        git push $TREE_OVMF $revision:refs/heads/xen-tested-master
index 9b51627334a742b80408de6e15e4d7df6665c3e6..e1528d494ce6ef67ae9948fa3d5bf809f0d1a813 100755 (executable)
@@ -235,6 +235,18 @@ if [ "x$REVISION_LINUXFIRMWARE" = x ]; then
        determine_version REVISION_LINUXFIRMWARE linuxfirmware LINUXFIRMWARE
         export REVISION_LINUXFIRMWARE
 fi
+if [ "x$REVISION_FREEBSD" = x ]; then
+       case "$branch" in
+       freebsd-*)
+               determine_version REVISION_FREEBSD "$branch" FREEBSD
+               ;;
+       *)
+               determine_version REVISION_FREEBSD freebsd-master FREEBSD
+               ;;
+       esac
+
+       export REVISION_FREEBSD
+fi
 
 case "$tree" in
 xen)
@@ -283,6 +295,10 @@ ovmf)
        realtree=ovmf
        NEW_REVISION=$REVISION_OVMF
        ;;
+freebsd)
+       realtree=freebsd
+       NEW_REVISION=$REVISION_FREEBSD
+       ;;
 *)
        NEW_REVISION=''
        wantpush=false
@@ -315,6 +331,7 @@ examine)    makeflight=make_hosts_flight
                        ./make-hosts-flight $1 $2 blessed-$3 $3 $4
                }
                ;;
+freebsd-*)     makeflight=./make-freebsd-flight ;;
 *)             makeflight=./make-flight ;;
 esac
 
index c4de52f7744c9af06caa46adca7281fb1cb7510e..4e67988d337de10dc3c65423d1302b4a792546f5 100755 (executable)
@@ -31,7 +31,7 @@ scriptoptions="$1"; shift
 LOGFILE=tmp/cr-for-branches.log
 export LOGFILE
 
-: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing xen-4.8-testing xen-4.9-testing xen-4.10-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing qemu-upstream-4.10-testing linux-linus linux-4.14 linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf xtf ${EXTRA_BRANCHES}}
+: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing xen-4.8-testing xen-4.9-testing xen-4.10-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing qemu-upstream-4.10-testing linux-linus linux-4.14 linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf xtf freebsd-master ${EXTRA_BRANCHES}}
 export BRANCHES
 
 fetchwlem=$wlem
index 903fb4e22c551e451d346e4866c9f0065a6af67b..8d2d26cf4105c7c024005da61007a64fd500960e 100644 (file)
@@ -80,6 +80,7 @@ select_xenbranch () {
        seabios)                tree=seabios;   xenbranch=xen-unstable ;;
        xtf)                    tree=xtf;       xenbranch=xen-unstable ;;
        ovmf)                   tree=ovmf;      xenbranch=xen-unstable ;;
+       freebsd-*)              tree=freebsd;   xenbranch=xen-unstable ;;
        distros-*|examine)      tree=none;      xenbranch=xen-unstable ;;
        osstest)                tree=osstest;   xenbranch=xen-unstable ;;
        esac
diff --git a/daily-cron-email-adhoc--freebsd-master b/daily-cron-email-adhoc--freebsd-master
new file mode 100644 (file)
index 0000000..b64821a
--- /dev/null
@@ -0,0 +1 @@
+To: royger@FreeBSD.org
diff --git a/daily-cron-email-play--freebsd-master b/daily-cron-email-play--freebsd-master
new file mode 100644 (file)
index 0000000..b64821a
--- /dev/null
@@ -0,0 +1 @@
+To: royger@FreeBSD.org
diff --git a/daily-cron-email-real--freebsd-master b/daily-cron-email-real--freebsd-master
new file mode 100644 (file)
index 0000000..6ee2fa4
--- /dev/null
@@ -0,0 +1,4 @@
+To: xen-devel@lists.xenproject.org,
+    osstest-admin@xenproject.org,
+    royger@FreeBSD.org
+Bcc: osstest-output@lists.xenproject.org