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

Side by Side Diff: client/common_lib/gbb_util.py

Issue 3433001: Fix factory test (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 | client/site_tests/factory_UploadLogs/factory_UploadLogs.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Provides convenience routines to access the GBB on the current BIOS. 6 """Provides convenience routines to access the GBB on the current BIOS.
7 7
8 GBBUtility is a wrapper of gbb_utility program. 8 GBBUtility is a wrapper of gbb_utility program.
9 """ 9 """
10 10
(...skipping 11 matching lines...) Expand all
22 It accesses the GBB on the current BIOS image. 22 It accesses the GBB on the current BIOS image.
23 """ 23 """
24 def __init__(self, 24 def __init__(self,
25 gbb_command='gbb_utility', 25 gbb_command='gbb_utility',
26 temp_dir=None, 26 temp_dir=None,
27 keep_temp_files=False): 27 keep_temp_files=False):
28 self._gbb_command = gbb_command 28 self._gbb_command = gbb_command
29 self._temp_dir = temp_dir 29 self._temp_dir = temp_dir
30 self._keep_temp_files = keep_temp_files 30 self._keep_temp_files = keep_temp_files
31 self._need_commit = False 31 self._need_commit = False
32 self._gbb_file = None
32 self._clear_cached() 33 self._clear_cached()
33 34
34 35
35 def __del__(self): 36 def __del__(self):
36 if self._gbb_file: 37 if self._gbb_file:
37 self._remove_temp_file(self._gbb_file) 38 self._remove_temp_file(self._gbb_file)
38 if self._need_commit: 39 if self._need_commit:
39 raise error.TestError( 40 raise error.TestError(
40 'You changed somethings; should commit or discard them.') 41 'You changed somethings; should commit or discard them.')
41 42
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 self._remove_temp_file(rootkey_file) 184 self._remove_temp_file(rootkey_file)
184 self._need_commit = False 185 self._need_commit = False
185 self._clear_cached() 186 self._clear_cached()
186 187
187 188
188 def discard(self): 189 def discard(self):
189 """Discard all uncommitted changes.""" 190 """Discard all uncommitted changes."""
190 if self._need_commit: 191 if self._need_commit:
191 self._need_commit = False 192 self._need_commit = False
192 self._clear_cached() 193 self._clear_cached()
OLDNEW
« no previous file with comments | « no previous file | client/site_tests/factory_UploadLogs/factory_UploadLogs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698