osstest: add native FreeBSD build tests
cover osstest: add native FreeBSD build tests
This series add support for bootstrapping a bare metal FreeBSD install using OSS Test and compiling Xen on it (only the kernel and the tools so far).
The first patch adds support for executing commands on remote boxes using ssh with password, which is needed in order to login into the installer. The rest of the patches focus on installing FreeBSD, the Xen build dependencies, and finally compiling the Xen kernel and tools.
This is a very RFC series, some of the code should use runvars and host vars instead of the hardcoded variables on top of the file. I've marked this with "TODO".
Also, there's some code duplication in ts-xen-build-freebsd from ts-xen-build, but I don't think both files can be merged easily.
I've been manually running the tests using the following runes:
OSSTEST_FLIGHT=standalone OSSTEST_JOB=build-amd64 OSSTEST_HOST=kodo4 ./ts-freebsd-host-install host=kodo4 OSSTEST_FLIGHT=standalone OSSTEST_JOB=build-amd64 OSSTEST_HOST=kodo4 ./ts-xen-build-prep-freebsd host=kodo4 OSSTEST_FLIGHT=standalone OSSTEST_JOB=build-amd64 OSSTEST_HOST=kodo4 ./ts-xen-build-freebsd host=kodo4
RFC PATCH 1/4 osstest: add routine to execute ssh with password
This is needed when bootstrapping FreeBSD, since the installer has ssh enabled with the root password set to 'root' by default.
--- Osstest/TestSupport.pm | 39 ++++++++++++++++++++++++++++++++++----- 1 files changed, 34 insertions(+), 5 deletions(-)
Osstest/TestSupport.pm +34 -5
@@ -60,6 +60,7 @@ BEGIN { target_install_packages target_install_packages_norec target_jobdir target_extract_jobdistpath_subdir target_extract_jobdistpath target_guest_lv_name + target_cmd_root_with_password poll_loop tcpconnect await_tcp contents_make_cpio file_simple_write_contents
@@ -313,12 +314,11 @@ END #---------- running commands eg on targets ---------- sub cmd { - my ($timeout,$stdout,@cmd) = @_; + my ($timeout,$child_sub,@cmd) = @_; my $child= fork; die $! unless defined $child; if (!$child) { - if (defined $stdout) { - open STDOUT, '>&', $stdout - or die "STDOUT $stdout $cmd[0] $!"; + if (defined $child_sub) { + $child_sub->(); } exec @cmd; die "$cmd[0]: $!";
@@ -573,9 +573,38 @@ sub tcmd { # $tcmd will be put between '' but not escaped sub target_cmd ($$;$) { tcmd(undef,'osstest',@_); } sub target_cmd_root ($$;$) { tcmd(undef,'root',@_); } +sub target_cmd_root_with_password { + my ($ho,$tcmd,$timeout,$password) = @_; + + open(my $temp_fh, '>', "tmp/t.ssh-password-helper.$flight.$job") + or die "Cannot open tmp/t.ssh-password-helper.$flight.$job: $!"; + print $temp_fh "#!/bin/sh\n\necho \"$password\"\n"; + chmod 0755, $temp_fh; + close $temp_fh; + + my $child_sub = sub { + $ENV{DISPLAY} = ":0"; + $ENV{SSH_ASKPASS} = "tmp/t.ssh-password-helper.$flight.$job"; + setsid or die "Can't start a new session: $!"; + }; + + my $ssh_opts = [qw(-o BatchMode=no + -o PasswordAuthentication=yes + -o ChallengeResponseAuthentication=yes), + @{ sshopts() }]; + + tcmdex($timeout,$child_sub, + 'ssh', $ssh_opts, + sshuho("root",$ho), $tcmd); + + unlink $temp_fh; +} + sub tcmdout { my $stdout= IO::File::new_tmpfile(); - tcmd($stdout,@_); + my $stdout_sub = sub { open STDOUT, '>&', $stdout + or die "STDOUT $stdout $!"; }; + tcmd($stdout_sub,@_); $stdout->seek(0,0) or die "$stdout $!"; my $r; { local ($/) = undef;
Signature · 7 lines
1.7.7.5 (Apple Git-26) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH RFC 1/4] osstest: add routine to execute ssh with password
Roger Pau Monne writes ("[PATCH RFC 1/4] osstest: add routine to execute ssh with password"):
Osstest/TestSupport.pm sub tcmd { # $tcmd will be put between '' but not escaped · line 580
Quoted 5 lines
This is needed when bootstrapping FreeBSD, since the installer has ssh enabled with the root password set to 'root' by default.
Osstest/TestSupport.pm +2
-0+ open(my $temp_fh, '>', "tmp/t.ssh-password-helper.$flight.$job") + or die "Cannot open tmp/t.ssh-password-helper.$flight.$job: $!";
Put this pathname in a variable so that you don't have to write it three times.
Quoted 1 line
+ print $temp_fh "#!/bin/sh\n\necho \"$password\"\n";
or die $!;
Quoted 1 line
+ chmod 0755, $temp_fh;
You should probably chmod the path, not the fh. That's more usual, although all of our hosts do in fact have fchmod(2).
Quoted 1 line
+ close $temp_fh;
or die $!;
Otherwise, this is fine.
Thanks,
Ian.
RFC PATCH 2/4 osstest: add support for installing bare metal FreeBSD
In reply to Roger Pau MonneThis is done using mfsBSD, which can be booted from pxelinux and contains a script to automatically install FreeBSD using ZFS on root. After the install the host is set to boot from the local disk.
--- ts-freebsd-host-install | 150 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 150 insertions(+), 0 deletions(-) create mode 100755 ts-freebsd-host-install
ts-freebsd-host-install new file +150 -0
@@ -0,0 +1,150 @@ +#!/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::Logtailer; + +tsreadconfig(); + +our ($whhost) = @ARGV; +$whhost ||= 'host'; +our $ho= selecthost($whhost); +exit 0 if $ho->{Flags}{'no-reinstall'}; +exit 0 if $ho->{SharedReady}; + +our %timeout= qw(ReadPreseed 350 + Sshd 2400); + +# TODO: all this should be runvars +our $version = '10.0-RELEASE'; +our $ftp = 'ftp.freebsd.org'; + +# TODO: this has to be set on a per-host basis. +# It should probably come from $ho? +our $disk = 'da0'; +our $nic = 'bce0'; + +sub install () { + my $authkeys= authorized_keys(); + + power_state($ho, 0); + + setup_pxeboot_firstboot(); + + logm('Booting into mfsBSD'); + + sleep(power_cycle_time($ho)); + + power_state($ho, 1); + + logm('Waiting for host to boot'); + await_tcp(get_timeout($ho,'boot',$timeout{Sshd}), 22, $ho); + + logm('Setting host to boot from local disk on next boot'); + setup_pxeboot_local($ho); + + logm('Setting up ssh keys for remote access'); + target_cmd_root_with_password($ho, <<END, 900, "root"); + mkdir -p ~/.ssh + cat <<ENDKEYS >~/.ssh/authorized_keys +$authkeys +ENDKEYS +END + + logm('Install of base system using ZFS on root'); + target_cmd_root($ho, <<END,2400); + gpart destroy -F $disk + zfsinstall -d $disk -u ftp://$ftp/pub/FreeBSD/releases/$r{arch}/$version -s 4g +END + + logm('Setting up ssh and keys for the installed system'); + target_cmd_root($ho, <<END, 900); + echo 'sshd_enable="YES"' >> /mnt/etc/rc.conf + echo 'PermitRootLogin yes' >> /mnt/etc/ssh/sshd_config + mkdir -p /mnt/root/.ssh + cat <<ENDKEYS >/mnt/root/.ssh/authorized_keys +$authkeys +ENDKEYS +END + + logm('Setting up serial console'); + target_cmd_root($ho, <<END, 900); + echo "-Dh" >> /mnt/boot.config + cat <<ENDB >>/mnt/boot/loader.conf +boot_multicons="YES" +boot_serial="YES" +comconsole_speed="$c{Baud}" +console="comconsole,vidconsole" +boot_verbose="YES" +ENDB +END + + logm('Setting up network'); + target_cmd_root($ho, <<END, 900); + echo 'cloned_interfaces="bridge0"' >> /mnt/etc/rc.conf + echo 'ifconfig_bridge0="addm $nic up"' >> /mnt/etc/rc.conf + echo 'ifconfig_$nic="DHCP"' >> /mnt/etc/rc.conf +END + + logm('Setting up miscellaneous settings'); + target_cmd_root($ho, <<END, 900); + cp /mnt/usr/share/zoneinfo/Europe/London /mnt/etc/localtime + echo 'sendmail_enable="NONE"' >> /mnt/etc/rc.conf +END + + logm('Rebooting into the installed system'); + target_reboot($ho); + + # Remove the known hosts file, since the keys will be regenerated after + # rebooting into the installed system + unlink "tmp/t.known_hosts_$flight.$job"; + + logm('Adding osstest user'); + target_cmd_root($ho, 'pw useradd osstest -m', 900); + target_cmd_root($ho, <<END, 900); + mkdir -p /home/osstest/.ssh + cat <<ENDKEYS >/home/osstest/.ssh/authorized_keys +$authkeys +ENDKEYS +END + + logm('OK: install completed'); +} + +sub setup_pxeboot_firstboot() { + my $mfs= 'freebsd/'.$version.'/'.$r{arch}.'/'.'mfsbsd-'.$version.'-'.$r{arch}.'.img'; + + logm('Using mfsBSD image: ' . $mfs); + + setup_pxeboot($ho, <<END); +serial 0 $c{Baud} +timeout 5 +label overwrite + menu label ^Overwrite + menu default + kernel memdisk + append initrd=$mfs +default overwrite +END +} + +install();
Signature · 7 lines
1.7.7.5 (Apple Git-26) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD
Roger Pau Monne writes ("[PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD"):
Quoted 3 lines
This is done using mfsBSD, which can be booted from pxelinux and contains a script to automatically install FreeBSD using ZFS on root. After the install the host is set to boot from the local disk.
...
ts-freebsd-host-install line 39
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+# TODO: all this should be runvars +our $version = '10.0-RELEASE'; +our $ftp = 'ftp.freebsd.org';
Does this mean that this script will fail if ftp.freebsd.org is down ? Is there a way of avoiding that ? We try to keep to a minimum the number of different servers that osstest's production instance depends on.
ts-freebsd-host-install line 44
Quoted 4 lines
ts-freebsd-host-install new file +4
-0+# TODO: this has to be set on a per-host basis. +# It should probably come from $ho? +our $disk = 'da0'; +our $nic = 'bce0';
Does this mean that this has to be manually configured, rather than detected ? It could be a host property but really it would be better not to have to set these kind of freebsd-specific host properties.
ts-freebsd-host-install line 67
Quoted 2 lines
ts-freebsd-host-install new file +2
-0+ target_cmd_root_with_password($ho, <<END, 900, "root"); + mkdir -p ~/.ssh
Missing `set -e'. (Throughout.)
ts-freebsd-host-install line 91
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+ logm('Setting up serial console'); + target_cmd_root($ho, <<END, 900); + echo "-Dh" >> /mnt/boot.config
Does FreeBSD's echo really simploy print things that look like options ? I would use printf(1).
ts-freebsd-host-install line 119
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+ # Remove the known hosts file, since the keys will be regenerated after + # rebooting into the installed system + unlink "tmp/t.known_hosts_$flight.$job";
Can you instead arrange for the fixed keys to be installed on the host ? Otherwise manually sshing into these test boxes is very annoying because the ssh keys keep changing.
Thanks,
Ian.
Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD
Quoted 10 lines · Ian Jackson
Roger Pau Monne writes ("[PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD"):
Quoted 3 lines
This is done using mfsBSD, which can be booted from pxelinux and contains a script to automatically install FreeBSD using ZFS on root. After the install the host is set to boot from the local disk.
...
ts-freebsd-host-install line 39
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+# TODO: all this should be runvars +our $version = '10.0-RELEASE'; +our $ftp = 'ftp.freebsd.org';Does this mean that this script will fail if ftp.freebsd.org is down ?
Yes, it will fail to fetch the sets.
Quoted 3 lines
Is there a way of avoiding that ? We try to keep to a minimum the number of different servers that osstest's production instance depends on.
I see two ways to solve this, either we create our own internal http/ftp mirror, or we could iterate over the list of official mirrors, expecting that at least one of them is accessible.
Quoted 9 lines
ts-freebsd-host-install line 44
Quoted 5 lines
ts-freebsd-host-install new file +4
-0+# TODO: this has to be set on a per-host basis. +# It should probably come from $ho? +our $disk = 'da0'; +our $nic = 'bce0';Does this mean that this has to be manually configured, rather than detected ? It could be a host property but really it would be better not to have to set these kind of freebsd-specific host properties.
I think I could probably come up with a way to detect the primary disk if the box doesn't contain multiple disk controllers. For the nic I could also see which one has the host IP assigned, and used that. It's probably going to be a little hacky, let me send another iteration with this and then let's decide.
Quoted 11 lines
ts-freebsd-host-install line 67
Quoted 2 lines
ts-freebsd-host-install new file +2
-0+ target_cmd_root_with_password($ho, <<END, 900, "root"); + mkdir -p ~/.sshMissing `set -e'. (Throughout.)
ts-freebsd-host-install line 91
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+ logm('Setting up serial console'); + target_cmd_root($ho, <<END, 900); + echo "-Dh" >> /mnt/boot.configDoes FreeBSD's echo really simploy print things that look like options ? I would use printf(1).
Yes:
# echo "-Dh" -Dh
Ok, I will switch it to printf.
Quoted 8 lines
ts-freebsd-host-install line 119
Quoted 4 lines
ts-freebsd-host-install new file +3
-0+ # Remove the known hosts file, since the keys will be regenerated after + # rebooting into the installed system + unlink "tmp/t.known_hosts_$flight.$job";Can you instead arrange for the fixed keys to be installed on the host ? Otherwise manually sshing into these test boxes is very annoying because the ssh keys keep changing.
The ssh key is only going to change one time, the key we have previous to this point is the key from the installer. I will look into copying this key into the installed system in order to prevent it from generating a new key.
Thanks, Roger.
Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD
Roger Pau Monné writes ("Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD"):
Quoted 3 lines
I see two ways to solve this, either we create our own internal http/ftp mirror, or we could iterate over the list of official mirrors, expecting that at least one of them is accessible.
The latter will do I think.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+ # Remove the known hosts file, since the keys will be regenerated after + # rebooting into the installed system + unlink "tmp/t.known_hosts_$flight.$job";
Quoted 8 lines
Quoted 3 lines
Can you instead arrange for the fixed keys to be installed on the host ? Otherwise manually sshing into these test boxes is very annoying because the ssh keys keep changing.
The ssh key is only going to change one time, the key we have previous to this point is the key from the installer. I will look into copying this key into the installed system in order to prevent it from generating a new key.
Right.
Thanks,
Ian.
Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD
In reply to Ian JacksonQuoted 7 lines · Ian Jackson
Roger Pau Monne writes ("[PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD"):
ts-freebsd-host-install line 91
Quoted 3 lines
ts-freebsd-host-install new file +3
-0+ logm('Setting up serial console'); + target_cmd_root($ho, <<END, 900); + echo "-Dh" >> /mnt/boot.configDoes FreeBSD's echo really simploy print things that look like options ? I would use printf(1).
Using echo seems better than printf:
# echo "-Dh" -Dh # printf "-Dh" printf: Illegal option -D
So I will leave that as-is.
Roger.
Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD
Roger Pau Monné writes ("Re: [PATCH RFC 2/4] osstest: add support for installing bare metal FreeBSD"):
Quoted 1 line
Using echo seems better than printf:
...
Quoted 2 lines
# printf "-Dh" printf: Illegal option -D
You want
printf "%s" "-Dh"
$ echo -h -h $ echo -n $ echo -nDh -nDh $ echo -n Dh Dh$ $ printf %s -Dh -Dh$ $ type echo echo is a shell builtin $ echo $SHELL /bin/bash $ /bin/echo -n $ dpkg -S /bin/echo coreutils: /bin/echo $
Ian.
RFC PATCH 3/4 osstest: prepare FreeBSD host for Xen build
In reply to Roger Pau MonneInstall pkg (the binary package management tool) and the dependencies needed to build Xen.
--- ts-xen-build-prep-freebsd | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) create mode 100755 ts-xen-build-prep-freebsd
ts-xen-build-prep-freebsd new file +44 -0
@@ -0,0 +1,44 @@ +#!/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::Logtailer; + +tsreadconfig(); + +our ($whhost) = @ARGV; +$whhost ||= 'host'; +our $ho= selecthost($whhost); +exit 0 if $ho->{SharedReady}; + +#TODO: should be a runvar +our $compiler = 'gcc47'; + +sub install_depends () { + logm('Installing Xen build dependencies'); + target_cmd_root($ho, <<END, 2400); + setenv ASSUME_ALWAYS_YES "YES" + pkg install -y mercurial git bash python bcc glib pkgconf yajl gmake pixman $compiler +END +} + +install_depends();
Signature · 7 lines
1.7.7.5 (Apple Git-26) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH RFC 3/4] osstest: prepare FreeBSD host for Xen build
Roger Pau Monne writes ("[PATCH RFC 3/4] osstest: prepare FreeBSD host for Xen build"):
Quoted 2 lines
Install pkg (the binary package management tool) and the dependencies needed to build Xen.
...
Quoted 1 line
+ pkg install -y mercurial git bash python bcc glib pkgconf yajl gmake pixman $compiler
This list is _much_ shorter than the one in ts-xen-build-prep. Why ?
Ian.
Re: [PATCH RFC 3/4] osstest: prepare FreeBSD host for Xen build
Quoted 8 lines · Ian Jackson
Roger Pau Monne writes ("[PATCH RFC 3/4] osstest: prepare FreeBSD host for Xen build"):
Quoted 2 lines
Install pkg (the binary package management tool) and the dependencies needed to build Xen.
...
Quoted 1 line
+ pkg install -y mercurial git bash python bcc glib pkgconf yajl gmake pixman $compiler
This list is _much_ shorter than the one in ts-xen-build-prep. Why ?
The base system already contains some of the utilities that we need:
flex, iasl, libssl, uuid.
Then bcc already contains bin86 on FreeBSD, and then there are some dependencies that I'm not sure why we need them: autoconf and automake are not used during the build, x11 and sdl are also not required.
I've missed to add libpci, ncurses, getttext, gawk and libtool. And I'm not sure about the xml2 and xslt ones, where they only used by xend? Because I seem to be able to compile the tools fine without them.
Thanks, Roger.
Re: [PATCH RFC 3/4] osstest: prepare FreeBSD host for Xen build
Roger Pau Monné writes ("Re: [PATCH RFC 3/4] osstest: prepare FreeBSD host for Xen build"):
Quoted 3 lines
The base system already contains some of the utilities that we need:
flex, iasl, libssl, uuid.
OK, good.
Quoted 3 lines
Then bcc already contains bin86 on FreeBSD, and then there are some dependencies that I'm not sure why we need them: autoconf and automake are not used during the build, x11 and sdl are also not required.
Do we not run autogen.sh ? I think you're right that X11 and SDL are strictly speaking optional.
Quoted 3 lines
I've missed to add libpci, ncurses, getttext, gawk and libtool. And I'm not sure about the xml2 and xslt ones, where they only used by xend? Because I seem to be able to compile the tools fine without them.
I haven't done a survey of what's strictly needed. ncurses is for things like xentop (and there may be others).
Thanks,
Ian.
RFC PATCH 4/4 osstest: add script to build Xen on FreeBSD
In reply to Roger Pau MonneThis is a compile-test only, and only tests that the Xen kernel and the tools can be build.
--- ts-xen-build-freebsd | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 91 insertions(+), 0 deletions(-) create mode 100755 ts-xen-build-freebsd
ts-xen-build-freebsd new file +91 -0
@@ -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();
Signature · 7 lines
1.7.7.5 (Apple Git-26) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH RFC 4/4] osstest: add script to build Xen on FreeBSD
;5;9~Roger Pau Monne writes ("[PATCH RFC 4/4] osstest: add script to build Xen on FreeBSD"):
Quoted 2 lines
This is a compile-test only, and only tests that the Xen kernel and the tools can be build.
Why can't ts-xen-build be used ? I think it should be used.
Ian.