[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V4 08/12] TestSupport.pm: introduce copy_iso_content_to_dir
... which returns a string of commands to pass into target_cmd_root. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- 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 5bf9b85..3995562 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -101,6 +101,7 @@ BEGIN { create_iso_xorriso create_empty_iso iso_gen_flags_basic + copy_iso_content_to_dir rewrite_config_nocd ); %EXPORT_TAGS = ( ); @@ -1906,6 +1907,19 @@ sub iso_gen_flags_basic() { -boot-info-table); } +sub copy_iso_content_to_dir($$) { + 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 rewrite_config_nocd ($$$) { my ($ho,$gho,$emptyiso) = @_; guest_editconfig($ho, $gho, sub { diff --git a/ts-redhat-install b/ts-redhat-install index 386c9ce..3bcac5c 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 |