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

Side by Side Diff: client/site_tests/factory_Wipe/factory_Wipe.py

Issue 3197015: Fix test dargs, and statusmap creation. (Closed) Base URL: http://src.chromium.org/git/autotest.git
Patch Set: tested, this should work 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 unified diff | Download patch
« no previous file with comments | « client/site_tests/factory_Review/factory_Review.py ('k') | 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 import os 5 import os
6 import time 6 import time
7 7
8 from autotest_lib.client.bin import factory 8 from autotest_lib.client.bin import factory
9 from autotest_lib.client.bin import factory_ui_lib as ful 9 from autotest_lib.client.bin import factory_ui_lib as ful
10 from autotest_lib.client.bin import test, utils 10 from autotest_lib.client.bin import test, utils
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 alert_seconds = 3 90 alert_seconds = 3
91 for i in range(alert_seconds): 91 for i in range(alert_seconds):
92 factory.log('WARNING: REQUIRED TEST CHECK IS BYPASSED. ' + 92 factory.log('WARNING: REQUIRED TEST CHECK IS BYPASSED. ' +
93 'THIS DEVICE CANNOT BE QUALIFIED.') 93 'THIS DEVICE CANNOT BE QUALIFIED.')
94 factory.log("Waiting %d seconds before test start." % alert_seconds) 94 factory.log("Waiting %d seconds before test start." % alert_seconds)
95 for i in range(alert_seconds, 0, -1): 95 for i in range(alert_seconds, 0, -1):
96 factory.log(">> wipe test will start in %d seconds..." % i) 96 factory.log(">> wipe test will start in %d seconds..." % i)
97 time.sleep(1) 97 time.sleep(1)
98 else: 98 else:
99 # first, check if all previous tests are passed. 99 # first, check if all previous tests are passed.
100 status_map = ful.StatusMap(status_file_path, test_list) 100 status_map = ful.StatusMap(test_list, status_file_path)
101 failed = status_map.filter(ful.FAILED) 101 failed = status_map.filter(ful.FAILED)
102 if failed: 102 if failed:
103 raise error.TestFail('Some tests were failed. ' + 103 raise error.TestFail('Some tests were failed. ' +
104 'Cannot start wipe.') 104 'Cannot start wipe.')
105 105
106 # check if all Google Required Tests are passed 106 # check if all Google Required Tests are passed
107 passed = [t.formal_name for t in status_map.filter(ful.PASSED)] 107 passed = [t.formal_name for t in status_map.filter(ful.PASSED)]
108 if not set(GOOGLE_REQUIRED_TESTS).issubset(passed): 108 if not set(GOOGLE_REQUIRED_TESTS).issubset(passed):
109 missing = list(set(GOOGLE_REQUIRED_TESTS).difference(passed)) 109 missing = list(set(GOOGLE_REQUIRED_TESTS).difference(passed))
110 raise error.TestFail('You need to execute following ' + 110 raise error.TestFail('You need to execute following ' +
111 'Google Required Tests: %s' % 111 'Google Required Tests: %s' %
112 (','.join(missing))) 112 (','.join(missing)))
113 113
114 # apply each final tests 114 # apply each final tests
115 self.check_developer_switch(check_developer_switch) 115 self.check_developer_switch(check_developer_switch)
116 self.flashrom_write_protect(write_protect) 116 self.flashrom_write_protect(write_protect)
117 self.wipe_stateful_partition(secure_wipe) 117 self.wipe_stateful_partition(secure_wipe)
OLDNEW
« no previous file with comments | « client/site_tests/factory_Review/factory_Review.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698