| 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.')
|
|
|