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

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

Issue 6623026: Refactor site_fmap, flashrom_utils and gbb_utils module into client/cros. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 9 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
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 glob, os 5 import glob, os
6 6
7 from autotest_lib.client.bin import factory, test, utils 7 from autotest_lib.client.bin import factory, test, utils
8 from autotest_lib.client.common_lib import error 8 from autotest_lib.client.common_lib import error
9 from autotest_lib.client.common_lib import gbb_util 9 from autotest_lib.client.cros import gbb_util
10 10
11 11
12 class factory_WriteGBB(test.test): 12 class factory_WriteGBB(test.test):
13 version = 3 13 version = 3
14 14
15 def run_once(self): 15 def run_once(self):
16 # More convenient to set the CWD to hardware_Components since a lot of 16 # More convenient to set the CWD to hardware_Components since a lot of
17 # values in the component list are based on that directory. 17 # values in the component list are based on that directory.
18 os.chdir(os.path.join(self.bindir, '../hardware_Components')) 18 os.chdir(os.path.join(self.bindir, '../hardware_Components'))
19 19
(...skipping 12 matching lines...) Expand all
32 raise error.TestError( 32 raise error.TestError(
33 'Unable to find the component file: %s' % component_file) 33 'Unable to find the component file: %s' % component_file)
34 component_file = component_files[0] 34 component_file = component_files[0]
35 components = eval(utils.read_file(component_file)) 35 components = eval(utils.read_file(component_file))
36 36
37 gbb = gbb_util.GBBUtility(temp_dir=self.resultsdir, 37 gbb = gbb_util.GBBUtility(temp_dir=self.resultsdir,
38 keep_temp_files=True) 38 keep_temp_files=True)
39 gbb.set_bmpfv(utils.read_file(components['data_bitmap_fv'][0])) 39 gbb.set_bmpfv(utils.read_file(components['data_bitmap_fv'][0]))
40 gbb.set_hwid(components['part_id_hwqual'][0]) 40 gbb.set_hwid(components['part_id_hwqual'][0])
41 gbb.commit() 41 gbb.commit()
OLDNEW
« no previous file with comments | « client/site_tests/factory_LogVpd/factory_LogVpd.py ('k') | client/site_tests/firmware_RomSize/firmware_RomSize.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698