From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: [PATCH V4 04/12] TestSupport.pm: introduce guest_create Date: Fri, 21 Mar 2014 16:14:18 +0000 Message-ID: <1395418466-6997-5-git-send-email-wei.liu2@citrix.com> References: <1395418466-6997-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: <1395418466-6997-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 Signed-off-by: Wei Liu --- Osstest/TestSupport.pm | 10 ++++++++-- ts-redhat-install | 8 ++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 2a36d9d..df6c4c1 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -92,7 +92,7 @@ BEGIN { guest_vncsnapshot_begin guest_vncsnapshot_stash guest_check_remus_ok guest_editconfig host_involves_pcipassthrough host_get_pcipassthrough_devs - toolstack + toolstack guest_create await_webspace_fetch_byleaf create_webfile file_link_contents get_timeout @@ -1219,7 +1219,13 @@ sub guest_await_reboot ($$$) { sub guest_destroy ($$) { my ($ho,$gho) = @_; target_cmd_root($ho, toolstack()->{Command}." destroy $gho->{Name}", 40); -} +} + +sub guest_create ($$$) { + my ($ho,$gho,$toolstack) = @_; + target_cmd_root($ho, "$toolstack create $gho->{CfgPath}", 100); +} + sub target_choose_vg ($$) { my ($ho, $mbneeded) = @_; diff --git a/ts-redhat-install b/ts-redhat-install index c0f4e76..4cff729 100755 --- a/ts-redhat-install +++ b/ts-redhat-install @@ -164,13 +164,9 @@ END }); } -sub start () { - target_cmd_root($ho, "$xl create $gho->{CfgPath}", 100); -} - if (!$stage) { prep(); - start(); + guest_create($ho,$gho$xl); } else { $gho= selectguest($gn,$gho); } @@ -180,6 +176,6 @@ if ($stage<2) { } rewrite_config_nocd($ho,$gho,$emptyiso); -start(); +guest_create($ho,$gho,$xl); guest_await_dhcp_tcp($gho,300); guest_check_up($gho); -- 1.7.10.4