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

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

Issue 1574012: Parametrize the keyboard test so that it can run in hwqual. Add to hwqual suite. (Closed)
Patch Set: Created 10 years, 9 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
Index: client/site_tests/hardware_KeyboardAssembly/hardware_KeyboardAssembly.py
diff --git a/client/site_tests/hardware_KeyboardAssembly/hardware_KeyboardAssembly.py b/client/site_tests/hardware_KeyboardAssembly/hardware_KeyboardAssembly.py
index b60fa8b93cfb15f7fcb60f85f9925a3d2d3f0725..27f863ef76b3b209d136d3ceda396c8a0a59c8ec 100644
--- a/client/site_tests/hardware_KeyboardAssembly/hardware_KeyboardAssembly.py
+++ b/client/site_tests/hardware_KeyboardAssembly/hardware_KeyboardAssembly.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging, os, re, utils
+import os, utils
from autotest_lib.client.bin import test
from autotest_lib.client.common_lib import error
@@ -11,10 +11,19 @@ class hardware_KeyboardAssembly(test.test):
preserve_srcdir = True
- def run_once(self):
+ def run_once(self, restart_ui=False):
# kill chrome
utils.system('/sbin/initctl stop ui', ignore_status=True)
os.chdir(self.srcdir)
- utils.system('./start_test.sh')
+ args = ''
+ if restart_ui:
+ args += '--exit-on-error'
+ status = utils.system('./start_test.sh ' + args, ignore_status=True)
+
+ if restart_ui:
+ utils.system('/sbin/initctl start ui', ignore_status=True)
+
+ if status:
+ raise error.TestFail('Test failed.')
« no previous file with comments | « client/site_tests/hardware_KeyboardAssembly/control ('k') | client/site_tests/hardware_KeyboardAssembly/src/KeyboardTest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698