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

[Xen-devel] [PATCH RFC 4/4] osstest: add script to build Xen on FreeBSD



This is a compile-test only, and only tests that the Xen kernel and
the tools can be build.

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-xen-build-freebsd |   91 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 91 insertions(+), 0 deletions(-)
 create mode 100755 ts-xen-build-freebsd

diff --git a/ts-xen-build-freebsd b/ts-xen-build-freebsd
new file mode 100755
index 0000000..020e4bc
--- /dev/null
+++ b/ts-xen-build-freebsd
@@ -0,0 +1,91 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2014 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/>.
+
+use strict qw(vars);
+use DBI;
+use POSIX;
+
+use Osstest;
+use Osstest::TestSupport;
+use Osstest::BuildSupport;
+use Osstest::Logtailer;
+
+tsreadconfig();
+
+our ($whhost) = @ARGV;
+$whhost ||= 'host';
+our $ho= selecthost($whhost);
+exit 0 if $ho->{SharedReady};
+
+# TODO: should be a runvar
+our $compiler = 'gcc47';
+
+builddirsprops();
+
+sub checkout () {
+    prepbuilddirs();
+
+    build_clone($ho, 'xen', $builddir, 'xen');
+
+    my $debug_build = $r{xen_build_debug} || 'y';
+
+    target_cmd_build($ho, 100, $builddir, <<END.
+        cd $builddir/xen
+    >.config
+    echo >>.config debug=$debug_build
+    echo >>.config GIT_HTTP=y
+    echo >>.config QEMU_REMOTE='$r{tree_qemu}'
+END
+               (nonempty($r{revision_qemu}) ? <<END : '').
+    echo >>.config QEMU_TAG='$r{revision_qemu}'
+END
+               (nonempty($r{tree_qemuu}) ? <<END : '').
+    echo >>.config QEMU_UPSTREAM_URL='$r{tree_qemuu}'
+END
+               (nonempty($r{revision_qemuu}) ? <<END : '').
+    echo >>.config QEMU_UPSTREAM_REVISION='$r{revision_qemuu}'
+END
+               (nonempty($r{tree_seabios}) ? <<END : '').
+    echo >>.config SEABIOS_UPSTREAM_URL='$r{tree_seabios}'
+END
+               (nonempty($r{revision_seabios}) ? <<END : '')
+    echo >>.config SEABIOS_UPSTREAM_TAG='$r{revision_seabios}'
+END
+               );
+}
+
+sub build () {
+    logm('Running configure');
+    target_cmd_build($ho, 400, $builddir, <<END);
+        cd xen
+        ./configure CC=$compiler HOSTCC=$compiler
+END
+    logm('Building Xen');
+    target_cmd_build($ho, 900, $builddir, <<END);
+        cd xen
+        gmake $makeflags xen CC=$compiler HOSTCC=$compiler
+END
+    logm('Building Tools');
+    target_cmd_build($ho, 2400, $builddir, <<END);
+        cd xen
+        gmake $makeflags tools CC=$compiler HOSTCC=$compiler
+END
+    logm('OK: Build successful');
+}
+
+checkout();
+build();
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
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®.