[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 09/13] TestSupport.pm: introduce iso_copy_content_from_image
... which returns a string of commands to pass into target_cmd_root. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 14 ++++++++++++++ ts-redhat-install | 10 +--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 82d3baa..b74422b 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -104,6 +104,7 @@ BEGIN { iso_create_xorriso iso_create_empty iso_gen_flags_basic + iso_copy_content_from_image guest_editconfig_nocd ); %EXPORT_TAGS = ( ); @@ -1929,6 +1930,19 @@ sub iso_gen_flags_basic() { -boot-info-table); } +sub iso_copy_content_from_image($$) { + my ($gho,$newiso) = @_; + return <<"END"; + set -ex + umount /mnt ||: + rm -rf $newiso + mount -o loop -r $gho->{Rimage} /mnt + mkdir $newiso + cp -a /mnt/. $newiso/. + umount /mnt +END +} + sub guest_editconfig_nocd ($$) { my ($gho,$emptyiso) = @_; guest_editconfig($gho->{Host}, $gho, sub { diff --git a/ts-redhat-install b/ts-redhat-install index 01e3615..924abac 100755 --- a/ts-redhat-install +++ b/ts-redhat-install @@ -130,15 +130,7 @@ sub prep () { more_prepareguest_hvm($ho,$gho, $ram_mb, $disk_mb, OnReboot => 'preserve', PostImageHook => sub { - target_cmd_root($ho, <<END, $isotimeout); - set -ex - umount /mnt ||: - rm -rf $newiso - mount -o loop -r $gho->{Rimage} /mnt - mkdir $newiso - cp -a /mnt/. $newiso/. - umount /mnt -END + target_cmd_root($ho, copy_iso_content_to_dir($gho,$newiso), $isotimeout); target_editfile_root($ho, "$newiso/isolinux/isolinux.cfg", sub { while (<EI>) { if (m/^\s+append/) { -- 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 |