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

Side by Side Diff: client/bin/factory.py

Issue 6736025: autotest/factory: improve message feedback on UI (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | client/bin/factory_ui » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 # DESCRIPTION : 6 # DESCRIPTION :
7 # 7 #
8 # This library provides common types and routines for the factory ui 8 # This library provides common types and routines for the factory ui
9 # infrastructure. This library explicitly does not import gtk, to 9 # infrastructure. This library explicitly does not import gtk, to
10 # allow its use by the autotest control process. 10 # allow its use by the autotest control process.
11 11
12 12
13 import signal 13 import signal
14 import subprocess 14 import subprocess
15 import sys 15 import sys
16 import time 16 import time
17 import factory_state 17 import factory_state
18 18
19 19
20 ACTIVE = 'ACTIVE' 20 ACTIVE = 'ACTIVE'
21 PASSED = 'PASS' 21 PASSED = 'PASS'
22 FAILED = 'FAIL' 22 FAILED = 'FAIL'
23 UNTESTED = 'UNTESTED' 23 UNTESTED = 'UNTESTED'
24 24
25 LOG_PATH = '/var/log/factory.log' 25 LOG_PATH = '/var/log/factory.log'
26 CONSOLE_LOG_PATH = '/var/log/factory_console.log'
26 DATA_PREFIX = 'FACTORY_DATA:' 27 DATA_PREFIX = 'FACTORY_DATA:'
27 FINAL_VERIFICATION_TEST_UNIQUE_NAME = 'factory_Verify' 28 LAST_PROBED_HWID_NAME = 'last_probed_hwid'
28 REVIEW_INFORMATION_TEST_UNIQUE_NAME = 'ReviewInformation' 29 REVIEW_INFORMATION_TEST_UNIQUE_NAME = 'ReviewInformation'
29 30
30 _state_instance = None 31 _state_instance = None
31 32
32 33
33 def log(s): 34 def log(s):
34 print >> sys.stderr, 'FACTORY: ' + s 35 print >> sys.stderr, 'FACTORY: ' + s
35 36
36 def get_state_instance(): 37 def get_state_instance():
37 ''' A quick way to get a (cached) instance for factory_state ''' 38 ''' A quick way to get a (cached) instance for factory_state '''
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 343
343 def lookup_status_by_unique_name(unique_name, test_list, _=None): 344 def lookup_status_by_unique_name(unique_name, test_list, _=None):
344 """Determine the status of given test. Somewhat heavyweight, 345 """Determine the status of given test. Somewhat heavyweight,
345 since it parses the status file.""" 346 since it parses the status file."""
346 # TODO(hungte) we should deprecate this function and use StatusMap or 347 # TODO(hungte) we should deprecate this function and use StatusMap or
347 # factory_state to query directly. 348 # factory_state to query directly.
348 test_db = TestDatabase(test_list) 349 test_db = TestDatabase(test_list)
349 test = test_db.get_test_by_unique_name(unique_name) 350 test = test_db.get_test_by_unique_name(unique_name)
350 unique_id = test_db.get_unique_id_str(test) 351 unique_id = test_db.get_unique_id_str(test)
351 return get_state_instance().lookup_test_status(unique_id) 352 return get_state_instance().lookup_test_status(unique_id)
OLDNEW
« no previous file with comments | « no previous file | client/bin/factory_ui » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698