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

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

Issue 2819079: Make test failure messages more verbose (and thus useful to testing operators). (Closed) Base URL: ssh://gitrw.chromium.org/autotest.git
Patch Set: Add more test fail messages Created 10 years, 4 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/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)

Powered by Google App Engine
This is Rietveld 408576698