public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Doktor <ldoktor@redhat.com>
To: autotest@test.kernel.org, kvm@vger.kernel.org,
	kvm-autotest@redhat.com, akong@redhat.com, lmr@redhat.com,
	ldoktor@redhat.com, jzupka@redhat.com
Subject: [PATCH] Add support for python2.4 virtio_console.
Date: Fri, 26 Nov 2010 10:58:20 +0100	[thread overview]
Message-ID: <1290765500-5106-2-git-send-email-ldoktor@redhat.com> (raw)
In-Reply-To: <1290765500-5106-1-git-send-email-ldoktor@redhat.com>

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

  reply	other threads:[~2010-11-26  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26  9:58 [KVM-autotest][PATCH] virtio_console on python2.4 Lukas Doktor
2010-11-26  9:58 ` Lukas Doktor [this message]
2010-11-26 12:24   ` [PATCH] Add support for python2.4 virtio_console Lucas Meneghel Rodrigues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290765500-5106-2-git-send-email-ldoktor@redhat.com \
    --to=ldoktor@redhat.com \
    --cc=akong@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=jzupka@redhat.com \
    --cc=kvm-autotest@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox