OLD | NEW |
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 hashlib | 5 import hashlib |
6 import os | 6 import os |
7 import re | 7 import re |
8 import time | 8 import time |
9 | 9 |
10 from autotest_lib.client.bin import factory | 10 from autotest_lib.client.bin import factory |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 # build parameters | 102 # build parameters |
103 db_path = os.path.join(self.bindir, | 103 db_path = os.path.join(self.bindir, |
104 '..', | 104 '..', |
105 'hardware_Components', | 105 'hardware_Components', |
106 'data_*/components*') | 106 'data_*/components*') |
107 args = ['gooftool', | 107 args = ['gooftool', |
108 '--finalize', | 108 '--finalize', |
109 '--verbose', | 109 '--verbose', |
110 '--db_path "%s"' % db_path, | 110 '--db_path "%s"' % db_path, |
| 111 '--wipe_method "%s"' % ('secure' if secure_wipe else 'fast'), |
111 '--upload_method "%s"' % upload_method, | 112 '--upload_method "%s"' % upload_method, |
112 ] | 113 ] |
113 if not check_and_enable_write_protect: | 114 if not check_and_enable_write_protect: |
114 self.alert_bypassed('WRITE PROTECTION') | 115 self.alert_bypassed('WRITE PROTECTION') |
115 args.append('--debug_dryrun_wpfw') | 116 args.append('--debug_dryrun_wpfw') |
116 | 117 |
117 cmd = ' '.join(args) | 118 cmd = ' '.join(args) |
118 gooftools.run(cmd) | 119 gooftools.run(cmd) |
119 | 120 |
120 # TODO(hungte) use Reboot in test list to replace this? | 121 # TODO(hungte) use Reboot in test list to replace this? |
121 os.system("sync; sync; sync; shutdown -r now") | 122 os.system("sync; sync; sync; shutdown -r now") |
OLD | NEW |