From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: [PATCH v5 04/13] TestSupport.pm: move rewrite_config_nocd to support library Date: Wed, 2 Apr 2014 20:29:37 +0100 Message-ID: <1396466986-21198-5-git-send-email-wei.liu2@citrix.com> References: <1396466986-21198-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1396466986-21198-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Wei Liu , ian.jackson@eu.citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org ... and rename it to guest_editconfig_nocd. Signed-off-by: Wei Liu --- 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