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 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.cros import flashrom_util |
8 | 8 |
9 class firmware_RomSize(test.test): | 9 class firmware_RomSize(test.test): |
10 version = 3 | 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. | 21 # Always restore system flashrom selection to BIOS. |
22 flashrom.select_bios_flashrom() | 22 flashrom.select_bios_flashrom() |
23 | 23 |
24 self.write_perf_keyval({"kb_system_rom_size": bios_size, | 24 self.write_perf_keyval({"kb_system_rom_size": bios_size, |
25 "kb_ec_rom_size": ec_size}) | 25 "kb_ec_rom_size": ec_size}) |
OLD | NEW |