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

Unified Diff: client/site_tests/factory_Leds/factory_Leds.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_Leds/factory_Leds.py
diff --git a/client/site_tests/factory_Leds/factory_Leds.py b/client/site_tests/factory_Leds/factory_Leds.py
index d31f147c64f41c918d62994fa9996420f5024ede..77ba481ef84a991cca7b49e143cce494ad60e17c 100644
--- a/client/site_tests/factory_Leds/factory_Leds.py
+++ b/client/site_tests/factory_Leds/factory_Leds.py
@@ -177,12 +177,19 @@ class factory_Leds(test.test):
factory.log('%s run_once' % self.__class__)
self._led_ctl_path = led_ctl_path
+ if not os.path.exists(self._led_ctl_path):
+ raise error.TestNAError('Command %s does not exist' %
+ self._led_ctl_path)
self._shift_color = ful.BLACK
self._shift_cnt = 0
os.chdir(self.srcdir)
- image = cairo.ImageSurface.create_from_png('leds.png')
+ try:
+ image = cairo.ImageSurface.create_from_png('leds.png')
+ except cairo.Error as e:
+ raise error.TestNAError('Error while opening leds.png: %s' %
+ e.message)
image_size = (image.get_width(), image.get_height())
self._leds_image = image

Powered by Google App Engine
This is Rietveld 408576698