[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 04/13] TestSupport.pm: move rewrite_config_nocd to support library
... and rename it to guest_editconfig_nocd. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- Osstest/TestSupport.pm | 11 +++++++++++ ts-redhat-install | 11 +---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index a7bb20f..094508d 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -102,6 +102,7 @@ BEGIN { ether_prefix iso_create_xorriso + guest_editconfig_nocd ); %EXPORT_TAGS = ( ); @@ -1904,4 +1905,14 @@ sub iso_create_xorriso ($$$$;@) { END } +sub guest_editconfig_nocd ($$) { + my ($gho,$emptyiso) = @_; + guest_editconfig($gho->{Host}, $gho, sub { + if (m/^\s*disk\s*\=/ .. /\]/) { + s/\Q$gho->{Rimage}\E/$emptyiso/; + } + s/^on_reboot.*/on_reboot='restart'/; + }); +} + 1; diff --git a/ts-redhat-install b/ts-redhat-install index c44b12a..e1754f5 100755 --- a/ts-redhat-install +++ b/ts-redhat-install @@ -168,15 +168,6 @@ sub start () { target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100); } -sub rewrite_config_nocd () { - guest_editconfig($ho, $gho, sub { - if (m/^\s*disk\s*\=/ .. /\]/) { - s/\Q$gho->{Rimage}\E/$emptyiso/; - } - s/^on_reboot.*/on_reboot='restart'/; - }); -} - if (!$stage) { prep(); start(); @@ -188,7 +179,7 @@ if ($stage<2) { guest_destroy($ho,$gho); } -rewrite_config_nocd(); +guest_editconfig_nocd($gho,$emptyiso); start(); guest_await_dhcp_tcp($gho,300); guest_check_up($gho); -- 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 |