* [KVM-autotest][PATCH] virtio_console on python2.4
@ 2010-11-26 9:58 Lukas Doktor
2010-11-26 9:58 ` [PATCH] Add support for python2.4 virtio_console Lukas Doktor
0 siblings, 1 reply; 3+ messages in thread
From: Lukas Doktor @ 2010-11-26 9:58 UTC (permalink / raw)
To: autotest, kvm, kvm-autotest, akong, lmr, ldoktor, jzupka
This patch modifies current virtio_console test to work on python2.4. It only modifies the HOST side of the test thus it depends on "[KVM-AUTOTEST][PATCH 2/2][virtio-console] Fix compatibility with python 2.4." patch which fixes the GUEST side.
Tested on Fedora 13 with python 2.4.6.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Add support for python2.4 virtio_console.
2010-11-26 9:58 [KVM-autotest][PATCH] virtio_console on python2.4 Lukas Doktor
@ 2010-11-26 9:58 ` Lukas Doktor
2010-11-26 12:24 ` Lucas Meneghel Rodrigues
0 siblings, 1 reply; 3+ messages in thread
From: Lukas Doktor @ 2010-11-26 9:58 UTC (permalink / raw)
To: autotest, kvm, kvm-autotest, akong, lmr, ldoktor, jzupka
From: Jiří Župka <jzupka@redhat.com>
---
client/tests/kvm/tests/virtio_console.py | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py
index d69c0a5..3edd051 100644
--- a/client/tests/kvm/tests/virtio_console.py
+++ b/client/tests/kvm/tests/virtio_console.py
@@ -102,7 +102,9 @@ def run_virtio_console(test, params, env):
"""
@return: If any of subtest not pass return True.
"""
- return True if self.failed > 0 else False
+ if self.failed > 0:
+ return True
+ return False
def get_result(self):
"""
@@ -121,16 +123,20 @@ def run_virtio_console(test, params, env):
for arg in result[2]:
sargs += str(arg) + ","
sargs = sargs[:-1]
- return ("Subtest (%s(%s)): -->%s") % (result[1], sargs,
- "PASS"if result[0] else "FAIL")
+ res = "FAIL"
+ if result[0]:
+ res = "PASS"
+ return ("Subtest (%s(%s)): -->%s") % (result[1], sargs,res)
def result_to_string(self, result):
"""
@param result: Result of test.
"""
- return ("Subtest (%s): -->%s") % (result[1], "PASS"if result[0]
- else "FAIL")
+ res = "FAIL"
+ if result[0]:
+ res = "PASS"
+ return ("Subtest (%s): -->%s") % (result[1], res)
def get_full_text_result(self):
--
1.7.2.3
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add support for python2.4 virtio_console.
2010-11-26 9:58 ` [PATCH] Add support for python2.4 virtio_console Lukas Doktor
@ 2010-11-26 12:24 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 3+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-11-26 12:24 UTC (permalink / raw)
To: Lukas Doktor; +Cc: autotest, kvm, kvm-autotest, akong, jzupka
On Fri, 2010-11-26 at 10:58 +0100, Lukas Doktor wrote:
> From: Jiří Župka <jzupka@redhat.com>
I actually made this patch myself on the v2 I sent to the mailing list
and applied after it. But thanks anyway :)
Lucas
> ---
> client/tests/kvm/tests/virtio_console.py | 16 +++++++++++-----
> 1 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/client/tests/kvm/tests/virtio_console.py b/client/tests/kvm/tests/virtio_console.py
> index d69c0a5..3edd051 100644
> --- a/client/tests/kvm/tests/virtio_console.py
> +++ b/client/tests/kvm/tests/virtio_console.py
> @@ -102,7 +102,9 @@ def run_virtio_console(test, params, env):
> """
> @return: If any of subtest not pass return True.
> """
> - return True if self.failed > 0 else False
> + if self.failed > 0:
> + return True
> + return False
>
> def get_result(self):
> """
> @@ -121,16 +123,20 @@ def run_virtio_console(test, params, env):
> for arg in result[2]:
> sargs += str(arg) + ","
> sargs = sargs[:-1]
> - return ("Subtest (%s(%s)): -->%s") % (result[1], sargs,
> - "PASS"if result[0] else "FAIL")
> + res = "FAIL"
> + if result[0]:
> + res = "PASS"
> + return ("Subtest (%s(%s)): -->%s") % (result[1], sargs,res)
>
>
> def result_to_string(self, result):
> """
> @param result: Result of test.
> """
> - return ("Subtest (%s): -->%s") % (result[1], "PASS"if result[0]
> - else "FAIL")
> + res = "FAIL"
> + if result[0]:
> + res = "PASS"
> + return ("Subtest (%s): -->%s") % (result[1], res)
>
>
> def get_full_text_result(self):
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-26 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-26 9:58 [KVM-autotest][PATCH] virtio_console on python2.4 Lukas Doktor
2010-11-26 9:58 ` [PATCH] Add support for python2.4 virtio_console Lukas Doktor
2010-11-26 12:24 ` Lucas Meneghel Rodrigues
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.