Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: client/site_tests/graphics_TearTest/graphics_TearTest.py

Issue 2031007: Do not ask user to press Fail button if pixmap to texture test fails because GLX is older than 1.3. (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/deps/glbench/src/teartest_glx.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « client/deps/glbench/src/teartest_glx.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698