Index: client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py |
diff --git a/client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py b/client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py |
index be62eb8b306658172ad9cc0a48c4b2b90aa43d70..9bd7af853861541e64bfbcf5568f5f42947e930b 100644 |
--- a/client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py |
+++ b/client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py |
@@ -1,3 +1,5 @@ |
+# -*- coding: utf-8 -*- |
+# |
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
@@ -68,7 +70,10 @@ class factory_ExtDisplay(test.test): |
subtest_name, subtest_cfg = self._current_subtest |
if 'cfg' in subtest_cfg: |
for cfg in subtest_cfg['cfg']: |
- utils.system(cfg) |
+ try: |
+ utils.system(cfg) |
+ except error.CmdError: |
+ raise error.TestNAError('Setup failed\n設定失敗\nCmd: %s' % cfg) |
factory.log("cmd: " + cfg) |
if 'cmd' in subtest_cfg: |
cmd = "%s %s" % (subtest_cfg['cmd'], self._sample) |
@@ -81,7 +86,10 @@ class factory_ExtDisplay(test.test): |
subtest_name, subtest_cfg = self._current_subtest |
if 'postcfg' in subtest_cfg: |
for cfg in subtest_cfg['postcfg']: |
- utils.system(cfg) |
+ try: |
+ utils.system(cfg) |
+ except error.CmdError: |
+ raise error.TestNAError('Setup failed\n設定失敗\nCmd: %s' % cfg) |
factory.log("cmd: " + cfg) |
self.close_bgjob(subtest_cfg) |