From: Ian Campbell Subject: [PATCH v3 10/19] Toolstack: Refactor consolecmd handling Date: Mon, 26 Jan 2015 14:35:26 +0000 Message-ID: <1422282935-24292-10-git-send-email-ian.campbell@citrix.com> References: <1422282868.6342.13.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1422282868.6342.13.camel@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: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Campbell --- Osstest/Toolstack/libvirt.pm | 6 ++++++ Osstest/Toolstack/xl.pm | 6 ++++++ ts-logs-capture | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index 0d09ffc..fb9b9a9 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -51,4 +51,10 @@ sub create ($$) { target_cmd_root($ho, "virsh create --file $cfg.xml", 100); } +sub consolecmd ($$) { + my ($self,$gho) = @_; + my $gn = $gho->{Name}; + return "virsh console $gn"; +} + 1; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index 12417ca..4997775 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -45,4 +45,10 @@ sub create ($$) { target_cmd_root($self->{Host}, $self->{Command}." create $cfg", 100); } +sub consolecmd ($$) { + my ($self,$gho) = @_; + my $gn = $gho->{Name}; + return $self->{Command}." console $gn"; +} + 1; diff --git a/ts-logs-capture b/ts-logs-capture index 841ad5a..dbca13a 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -195,7 +195,7 @@ sub fetch_logs_guest ($) { logm("cannot find domid: $@"); return; } - my $consolecmd= toolstack($ho)->{Command}." console $gho->{Name}"; + my $consolecmd= toolstack($ho)->consolecmd($gho); try_cmd_output_save("sleep 1 | $consolecmd | cat", "guest-$gho->{Name}-console"); -- 2.1.4