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

[Xen-devel] [PATCH v4 07/11] osstest: add freebsd installer update script



This script allows moving a FreeBSD build (as produced by
ts-freebsd-create-mfsbsd) so it's usable by other test/build jobs.

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 mg-freebsd-installer-update | 59 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100755 mg-freebsd-installer-update

diff --git a/mg-freebsd-installer-update b/mg-freebsd-installer-update
new file mode 100755
index 0000000..b55d9e0
--- /dev/null
+++ b/mg-freebsd-installer-update
@@ -0,0 +1,59 @@
+#!/bin/bash
+# usage
+#   ./mg-freebsd-installer-update <flight> <job>
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2015 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
+
+. cri-getconfig
+
+flight=$1
+job=$2
+
+fail () { echo >&2 "$0: $1"; exit 1; }
+
+case $job in
+    *amd64*)
+        arch=amd64
+        ;;
+    *i386*)
+        arch=i386
+        ;;
+    *)
+        fail "Unsupported arch"
+        ;;
+esac
+
+date=`date +%Y-%m-%d`
+images=`getconfig Images`
+dst=$images/freebsd/$date/$arch/
+src=logs/$flight/$job/build/
+
+mkdir -p $dst
+
+# Copy sets and mfsBSD image
+cp $src/*.txz $dst
+cp $src/MANIFEST $dst
+cp $src/mfsbsd.img $dst
+
+# Set "current" to point to the new version
+rm -rf $images/freebsd/current
+ln -s $date $images/freebsd/current
+
+echo "Produced version: $date"
-- 
1.9.3 (Apple Git-50)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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