@@ -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):