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

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

Issue 3296001: Get size using --get-size in flashrom_util.py instead of reading whole flash. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Add mock implementation of system_output 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
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 from autotest_lib.client.bin import test 5 from autotest_lib.client.bin import test
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 from autotest_lib.client.common_lib import flashrom_util 7 from autotest_lib.client.common_lib import flashrom_util
8 8
9 class firmware_RomSize(test.test): 9 class firmware_RomSize(test.test):
10 version = 2 10 version = 3
11 11
12 def run_once(self): 12 def run_once(self):
13 flashrom = flashrom_util.flashrom_util() 13 flashrom = flashrom_util.flashrom_util()
14 14
15 flashrom.select_bios_flashrom() 15 flashrom.select_bios_flashrom()
16 bios_size = flashrom.get_size() / 1024 16 bios_size = flashrom.get_size() / 1024
17 17
18 flashrom.select_ec_flashrom() 18 flashrom.select_ec_flashrom()
19 ec_size = flashrom.get_size() / 1024 19 ec_size = flashrom.get_size() / 1024
20 20
21 # Always restore system flashrom selection to BIOS.
22 flashrom.select_bios_flashrom()
23
21 self.write_perf_keyval({"kb_system_rom_size": bios_size, 24 self.write_perf_keyval({"kb_system_rom_size": bios_size,
22 "kb_ec_rom_size": ec_size}) 25 "kb_ec_rom_size": ec_size})
OLDNEW
« client/common_lib/flashrom_util.py ('K') | « client/common_lib/flashrom_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698