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

Unified Diff: client/site_tests/hardware_GPIOSwitches/hardware_GPIOSwitches.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
« no previous file with comments | « client/site_tests/factory_Leds/factory_Leds.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/hardware_GPIOSwitches/hardware_GPIOSwitches.py
diff --git a/client/site_tests/hardware_GPIOSwitches/hardware_GPIOSwitches.py b/client/site_tests/hardware_GPIOSwitches/hardware_GPIOSwitches.py
index bc35e026ff50c2f2436ff362f72230e1c785941a..0b2878ccbbe08db24b288ed6b4e555de42b5eab6 100644
--- a/client/site_tests/hardware_GPIOSwitches/hardware_GPIOSwitches.py
+++ b/client/site_tests/hardware_GPIOSwitches/hardware_GPIOSwitches.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.
@@ -25,7 +27,10 @@ class hardware_GPIOSwitches(test.test):
if os.path.exists(gpio_root):
utils.system("rm -rf %s" % gpio_root)
utils.system("mkdir %s" % (gpio_root))
- utils.system("/usr/sbin/gpio_setup")
+ try:
+ utils.system("/usr/sbin/gpio_setup")
+ except error.CmdError:
+ raise error.TestNAError('GPIO setup failed\nGPIO 設定失敗')
self._gpio_root=gpio_root
def run_once(self):
« no previous file with comments | « client/site_tests/factory_Leds/factory_Leds.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698