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

Side by Side Diff: client/site_tests/factory_DeveloperRecovery/factory_DeveloperRecovery.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, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 # 2 #
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 7
8 # DESCRIPTION : 8 # DESCRIPTION :
9 # 9 #
10 # Intended for use during manufacturing to validate Developer mode 10 # Intended for use during manufacturing to validate Developer mode
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 class factory_DeveloperRecovery(test.test): 314 class factory_DeveloperRecovery(test.test):
315 version = 1 315 version = 1
316 preserve_srcdir = True 316 preserve_srcdir = True
317 317
318 def initialize(self, gpio_root = '/home/gpio'): 318 def initialize(self, gpio_root = '/home/gpio'):
319 # setup gpio's for reading. Must re-create after each POR 319 # setup gpio's for reading. Must re-create after each POR
320 if os.path.exists(gpio_root): 320 if os.path.exists(gpio_root):
321 utils.system("rm -rf %s" % gpio_root) 321 utils.system("rm -rf %s" % gpio_root)
322 utils.system("mkdir %s" % (gpio_root)) 322 utils.system("mkdir %s" % (gpio_root))
323 utils.system("/usr/sbin/gpio_setup") 323 try:
324 utils.system("/usr/sbin/gpio_setup")
325 except error.CmdError:
326 raise error.TestNAError('GPIO setup failed\nGPIO 設定失敗')
324 self._gpio_root=gpio_root 327 self._gpio_root=gpio_root
325 328
326 def run_once(self, layout=None): 329 def run_once(self, layout=None):
327 330
328 factory.log('%s run_once' % self.__class__) 331 factory.log('%s run_once' % self.__class__)
329 332
330 os.chdir(self.srcdir) 333 os.chdir(self.srcdir)
331 dr_image = cairo.ImageSurface.create_from_png('%s.png' % layout) 334 dr_image = cairo.ImageSurface.create_from_png('%s.png' % layout)
332 image_size = (dr_image.get_width(), dr_image.get_height()) 335 image_size = (dr_image.get_width(), dr_image.get_height())
333 336
334 test = DevRecTest(dr_image, self._gpio_root) 337 test = DevRecTest(dr_image, self._gpio_root)
335 338
336 drawing_area = gtk.DrawingArea() 339 drawing_area = gtk.DrawingArea()
337 drawing_area.set_size_request(*image_size) 340 drawing_area.set_size_request(*image_size)
338 drawing_area.connect('expose_event', test.expose_event) 341 drawing_area.connect('expose_event', test.expose_event)
339 drawing_area.add_events(gtk.gdk.EXPOSURE_MASK) 342 drawing_area.add_events(gtk.gdk.EXPOSURE_MASK)
340 gobject.timeout_add(200, test.timer_event, drawing_area) 343 gobject.timeout_add(200, test.timer_event, drawing_area)
341 344
342 test.start_countdown(test.timeout) 345 test.start_countdown(test.timeout)
343 346
344 ful.run_test_widget(self.job, drawing_area) 347 ful.run_test_widget(self.job, drawing_area)
345 348
346 factory.log('%s run_once finished' % self.__class__) 349 factory.log('%s run_once finished' % self.__class__)
OLDNEW
« no previous file with comments | « no previous file | client/site_tests/factory_ExtDisplay/factory_ExtDisplay.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698