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

Unified Diff: client/site_tests/hardware_Components/firmware_hash.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 side-by-side diff with in-line comments
Download patch
Index: client/site_tests/hardware_Components/firmware_hash.py
diff --git a/client/site_tests/hardware_Components/firmware_hash.py b/client/site_tests/hardware_Components/firmware_hash.py
index e7f9887d897cd8cfb507af69605ba0cc99da01e8..4dd1f738e9b6b532c1d4f8665ecd63804f4ac919 100755
--- a/client/site_tests/hardware_Components/firmware_hash.py
+++ b/client/site_tests/hardware_Components/firmware_hash.py
@@ -14,12 +14,12 @@ import tempfile
# This file may be shared by autotest framework and some command line tools
# setting PYTHONPATH, so we need to try different importing paths here.
try:
- from autotest_lib.client.common_lib import flashrom_util
- from autotest_lib.client.common_lib import site_fmap
+ from autotest_lib.client.cros import flashrom_util
+ from autotest_lib.client.cros import fmap
except ImportError:
# try to load from pre-defined PYTHONPATH
import flashrom_util
- import site_fmap
+ import fmap
def get_bios_ro_hash(file_source=None, exception_type=Exception):
@@ -40,7 +40,7 @@ def get_bios_ro_hash(file_source=None, exception_type=Exception):
flashrom.initialize(flashrom.TARGET_BIOS, target_file=file_source)
image = flashrom.get_current_image()
- fmap_obj = site_fmap.fmap_decode(image)
+ fmap_obj = fmap.fmap_decode(image)
if not fmap_obj:
raise exception_type('No FMAP structure in flashrom.')
@@ -50,7 +50,7 @@ def get_bios_ro_hash(file_source=None, exception_type=Exception):
# trust FMAP here.
# TODO(hungte) we can check that FMAP must reside in RO section, and the
# BSTUB must be aligned to bottom of firmware.
- hash_src = hash_src + site_fmap.fmap_encode(fmap_obj)
+ hash_src = hash_src + fmap.fmap_encode(fmap_obj)
# New firmware spec defined new "RO_SECTION" which includes all sections to
# be hashed. When that section exists, we should override hash_ro_list.
« no previous file with comments | « client/site_tests/firmware_RomSize/firmware_RomSize.py ('k') | client/site_tests/hardware_Components/hardware_Components.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698