| Index: client/site_tests/graphics_TearTest/graphics_TearTest.py
|
| diff --git a/client/site_tests/graphics_TearTest/graphics_TearTest.py b/client/site_tests/graphics_TearTest/graphics_TearTest.py
|
| index fa3ccd842906ff815be3701340eb2c67bf2c88dc..3e8cb04a5108b83a23af8674cf1ec16bcd4034af 100644
|
| --- a/client/site_tests/graphics_TearTest/graphics_TearTest.py
|
| +++ b/client/site_tests/graphics_TearTest/graphics_TearTest.py
|
| @@ -61,14 +61,18 @@ class graphics_TearTest(site_ui_test.UITest):
|
| for test in tests:
|
| cmd = test['cmd']
|
| logging.info("command launched: %s" % cmd)
|
| - utils.system(site_ui.xcommand(cmd))
|
| -
|
| - test['result'] = html_button('Pass') + html_button('Fail')
|
| - dialog = site_ui.Dialog(question=TEMPLATE.format(header, tests),
|
| - choices=[])
|
| - # Store user's response if the testcase passed or failed.
|
| - result = dialog.get_result()
|
| - test['result'] = result if result else 'Timeout'
|
| + ret = utils.system(site_ui.xcommand(cmd), ignore_status=True)
|
| +
|
| + if ret == 0:
|
| + test['result'] = html_button('Pass') + html_button('Fail')
|
| + dialog = site_ui.Dialog(
|
| + question=TEMPLATE.format(header, tests), choices=[])
|
| + # Store user's response if the testcase passed or failed.
|
| + result = dialog.get_result()
|
| + test['result'] = result if result else 'Timeout'
|
| + else:
|
| + # If test return nonzero status, mark it as failed.
|
| + test['result'] = 'Fail'
|
|
|
| # Test passed if all testcases passed.
|
| passed = all(test['result'] == 'Pass' for test in tests)
|
|
|