|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 03/13] TestSupport.pm: introduce iso_create_xorriso
... and convert ts-redhat-install to make use of it.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Osstest/TestSupport.pm | 16 ++++++++++++++++
ts-redhat-install | 15 +++++----------
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 37e8b9e..a7bb20f 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -100,6 +100,8 @@ BEGIN {
setup_pxeboot setup_pxeboot_local host_pxefile
ether_prefix
+
+ iso_create_xorriso
);
%EXPORT_TAGS = ( );
@@ -1888,4 +1890,18 @@ default local
END
}
+#---------- ISO images ----------
+sub iso_create_xorriso ($$$$;@) {
+ my ($ho,$iso,$dir,$isotimeout,@xopts) = @_;
+
+ # These options forces ISO creation even if input directory is
+ # empty. They have to go last.
+ my @force_iso_creation = qw(-- -changes_pending yes);
+
+ target_cmd_root($ho, <<END, 60);
+ mkdir -p $dir
+ xorriso @xopts -o $iso $dir/. @force_iso_creation
+END
+}
+
1;
diff --git a/ts-redhat-install b/ts-redhat-install
index a945033..c44b12a 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -112,7 +112,7 @@ END
our $emptyiso= '/root/empty.iso';
sub prep () {
- target_install_packages_norec($ho, qw(lvm2 rsync genisoimage));
+ target_install_packages_norec($ho, qw(lvm2 rsync xorriso));
my $isotimeout= 600;
@@ -123,18 +123,15 @@ sub prep () {
my $newiso= '/root/newiso';
my $emptydir= '/root/empty-dir';
- my @isogen_base= qw(-R -J -T);
+ my @isogen_base= qw(-as mkisofs -R -J);
my @isogen_boot= qw(-b isolinux/isolinux.bin
-c isolinux/boot.cat
-no-emul-boot
-boot-load-size 4
-boot-info-table);
+ my @isogen= (@isogen_base, @isogen_boot);
- target_cmd_root($ho, <<END, 60);
- set -e
- mkdir -p $emptydir
- genisoimage -o $emptyiso @isogen_base $emptydir/.
-END
+ iso_create_xorriso($ho, $emptyiso, $emptydir, 60, @isogen_base);
more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
OnReboot => 'preserve',
@@ -163,9 +160,7 @@ END
target_putfilecontents_root_stash($ho, 10, kickstart(),
"$newiso/ks.cfg");
- target_cmd_root($ho, <<END, $isotimeout);
- genisoimage -o $gho->{Rimage} @isogen_base @isogen_boot $newiso/.
-END
+ iso_create_xorriso($ho, $gho->{Rimage}, $newiso, $isotimeout, @isogen);
});
}
--
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 |