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

Unified Diff: gooftool

Issue 6812015: gooftool: add --wipe_method to support secure/fast wiping methods (Closed) Base URL: ssh://gitrw.chromium.org:9222/factory_test_tools.git@master
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gooftool
diff --git a/gooftool b/gooftool
index 4b99fefa42ebc97be7f46b70a3b26de48094c78a..77de019e2e13e3e4d201b5e77b602cf753dfa781 100755
--- a/gooftool
+++ b/gooftool
@@ -341,7 +341,17 @@ def prepare_wipe():
'gft_prepare_wipe.sh')
if not os.path.exists(wipe_script):
ErrorDie('prepare_wipe: cannot find script to prepare for wiping.')
- return_code = os.system('FACTORY_WIPE_TAGS=fast %s' % wipe_script)
+ wipe_method_map = {
+ 'fast': 'fast',
+ 'secure': '',
+ }
+ method = g_options.wipe_method
+ if method not in wipe_method_map:
+ ErrorDie('prepare_wipe: unknown wipe method: %s' % method)
+ tag = wipe_method_map[method]
+ command = 'FACTORY_WIPE_TAGS=%s %s' % (tag, wipe_script)
+ DebugMsg('prepare_wipe: execute command: %s' % command)
+ return_code = os.system(command)
if return_code != 0:
ErrorDie('prepare_wipe: failed(%s) in calling preparation script'
% return_code)
@@ -437,6 +447,8 @@ def ConsoleParser():
parser.add_option('--prepare_wipe', action='store_true',
help='prepare for wiping factory tests and '
'transit to release mode in next reboot')
+ parser.add_option('--wipe_method', metavar='METHOD', default='secure',
+ help='assign the wipe method (secure/fast).')
parser.add_option('--verify', action='store_true',
help='runs: --verify_switch_wp, --verify_switch_dev, '
'--verify_hwid, --verify_keys')
« 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