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

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

Issue 3351019: fix: factory framework member name change (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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.
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 else: 214 else:
215 return self._status_map[test].count 215 return self._status_map[test].count
216 216
217 def lookup_error_msg(self, test): 217 def lookup_error_msg(self, test):
218 return self._status_map[test].error_msg 218 return self._status_map[test].error_msg
219 219
220 def filter_by_status(self, target_status): 220 def filter_by_status(self, target_status):
221 comp = (isinstance(target_status, list) and 221 comp = (isinstance(target_status, list) and
222 (lambda s: s in target_status) or 222 (lambda s: s in target_status) or
223 (lambda s: s == target_status)) 223 (lambda s: s == target_status))
224 return [test for test in self._test_db.all_tests 224 return [test for test in self._test_db.get_all_tests()
225 if comp(self.lookup_status(test))] 225 if comp(self.lookup_status(test))]
226 226
227 def next_untested(self): 227 def next_untested(self):
228 for test in self._test_list: 228 for test in self._test_list:
229 if self.lookup_status(test) == UNTESTED: 229 if self.lookup_status(test) == UNTESTED:
230 return test 230 return test
231 return None 231 return None
232 232
233 def get_active_top_level_test(self): 233 def get_active_top_level_test(self):
234 if self._active_automated_seq: 234 if self._active_automated_seq:
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 self._log_data.read_new_data() 392 self._log_data.read_new_data()
393 return self.process_kbd_shortcut_activation() 393 return self.process_kbd_shortcut_activation()
394 394
395 395
396 def lookup_status_by_unique_name(unique_name, test_list, status_file_path): 396 def lookup_status_by_unique_name(unique_name, test_list, status_file_path):
397 """Determine the status of given test. Somewhat heavyweight, 397 """Determine the status of given test. Somewhat heavyweight,
398 since it parses the status file.""" 398 since it parses the status file."""
399 test_db = TestDatabase(test_list) 399 test_db = TestDatabase(test_list)
400 test = test_db.get_test_by_unique_name(unique_name) 400 test = test_db.get_test_by_unique_name(unique_name)
401 return StatusMap(test_list, status_file_path, test_db).lookup_status(test) 401 return StatusMap(test_list, status_file_path, test_db).lookup_status(test)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698