|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V4 06/12] TestSupport.pm: introduce create_empty_iso
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
Osstest/TestSupport.pm | 15 +++++++++++++++
ts-redhat-install | 17 ++++++++---------
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index df6c4c1..a4a738f 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -99,6 +99,7 @@ BEGIN {
setup_pxeboot setup_pxeboot_local host_pxefile
create_iso_xorriso
+ create_empty_iso
rewrite_config_nocd
);
%EXPORT_TAGS = ( );
@@ -1881,6 +1882,20 @@ END
}
+sub create_empty_iso($$$) {
+ my ($ho,$emptyiso,$emptydir) = @_;
+ my @isogen_opts= qw(-as mkisofs -R -J);
+
+ # Unfortunately xorriso refuses to create an ISO if the input
+ # directory is empty.
+ target_cmd_root($ho, <<END, 60);
+ mkdir -p $emptydir
+ echo empty > $emptydir/empty
+END
+
+ create_iso_xorriso($ho, $emptyiso, $emptydir, 60, @isogen_opts);
+}
+
sub rewrite_config_nocd ($$$) {
my ($ho,$gho,$emptyiso) = @_;
guest_editconfig($ho, $gho, sub {
diff --git a/ts-redhat-install b/ts-redhat-install
index fb60caf..8b2b2f8 100755
--- a/ts-redhat-install
+++ b/ts-redhat-install
@@ -123,15 +123,14 @@ sub prep () {
my $newiso= '/root/$flight.$job.$gn-newiso';
my $emptydir= '/root/$flight.$job.$gn-empty-dir';
- 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);
-
- create_iso_xorriso($ho, $emptyiso, $emptydir, 60, @isogen_base);
+ create_empty_iso($ho, $emptyiso, $emptydir);
+
+ my @isogen= qw(-as mkisofs -R -J
+ -b isolinux/isolinux.bin
+ -c isolinux/boot.cat
+ -no-emul-boot
+ -boot-load-size 4
+ -boot-info-table);
more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb,
OnReboot => 'preserve',
--
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 |