|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 18/26] ts-debian-hvm-install, etc.: Do not hardcode in-iso path
ts-debian-hvm-install hardcoded `install.amd' as the directory in the
.iso in which to find the kernel and initrd. This is wrong for
architectures other than amd64.
Instead, pass this information in runvars (as is done for the netinst
installs in make-distros-flight), and honour it in
ts-debian-hvm-install.
If the runvars are not set, default to the previous hardcoded values.
(This arranges that clones of old flights still work with new osstest,
eg for bisection.)
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
make-flight | 8 ++++++++
ts-debian-hvm-install | 25 +++++++++++++++++++------
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/make-flight b/make-flight
index c1f40b9..accf922 100755
--- a/make-flight
+++ b/make-flight
@@ -264,6 +264,12 @@ do_hvm_debian_test_one () {
local arch=$(branch_debianhvm_arch)
+ case "$arch" in
+ amd64) iso_dir='install.amd' ;;
+ i386) iso_dir='install.386' ;;
+ *) iso_dir="install.$arch" ;;
+ esac
+
stubdom_suffix=""
stubdom_runvar=""
if [ x$stubdom = xtrue ]; then
@@ -276,6 +282,8 @@ do_hvm_debian_test_one () {
enable_xsm=$xsm \
$stubdom_runvar \
debianhvm_image=debian-7.2.0-$arch-CD-1.iso \
+ debianhvm_iso_kernel=/$iso_dir/vmlinuz \
+ debianhvm_iso_ramdisk=/$iso_dir/initrd.gz \
bios=$bios \
all_hostflags=$most_hostflags,hvm
}
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 4b1eca4..3b93ebd 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -48,6 +48,8 @@ our $disk_mb= 10000;
our $guesthost= "$gn.guest.osstest";
our $gho;
+our ($kernel, $ramdisk);
+
our $gsuite= guest_var($gho,'suite',$c{GuestDebianSuite});
sub preseed () {
@@ -130,14 +132,14 @@ set default="0"
set timeout=5
menuentry 'debian guest auto Install' {
- linux /install.amd/vmlinuz $cmdline
- initrd /install.amd/initrd.gz
+ linux $kernel $cmdline
+ initrd $ramdisk
}
END
}
sub isolinux_cfg () {
- my $cmdline = gcmdline("initrd=/install.amd/initrd.gz");
+ my $cmdline = gcmdline("initrd=$ramdisk");
return <<"END";
default autoinstall
@@ -145,7 +147,7 @@ sub isolinux_cfg () {
timeout 0
label autoinstall
- kernel /install.amd/vmlinuz
+ kernel $kernel
append $cmdline
END
}
@@ -156,9 +158,9 @@ sub prepare_initrd ($$$) {
rm -rf $initrddir
mkdir $initrddir
cd $initrddir
- gzip -d < $newiso/install.amd/initrd.gz | cpio --extract
--make-directories --no-absolute-filename
+ gzip -d < $newiso$ramdisk | cpio --extract --make-directories
--no-absolute-filename
cp $preseed_file_path preseed.cfg
- find . | cpio -H newc --create | gzip -9 > $newiso/install.amd/initrd.gz
+ find . | cpio -H newc --create | gzip -9 > $newiso$ramdisk
cd -
rm -rf $initrddir
cd $newiso
@@ -169,6 +171,13 @@ END
our $emptyiso= "/root/$flight.$job.$gn-empty.iso";
+sub iso_path ($$) {
+ my ($which, $deftail) = @_;
+ my $v = guest_var($gho, "iso_$which", "/install.amd/$deftail");
+ die "$gho->{Guest} $which $v ?" unless $v =~ m#^/#;
+ return $v;
+}
+
sub prep () {
target_install_packages_norec($ho, qw(lvm2 rsync genisoimage));
@@ -177,6 +186,10 @@ sub prep () {
$gho= prepareguest($ho, $gn, $guesthost, 22,
$disk_mb + 1,
200);
+
+ $kernel = iso_path('kernel', 'vmlinuz');
+ $ramdisk = iso_path('ramdisk', 'initrd.gz');
+
my $base = "/root/$flight.$job.$gn-";
my $newiso= $base . "newiso";
my $emptydir= $base . "empty-dir";
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |