aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Marin <gmx@chromium.org>2018-05-14 13:40:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-16 05:08:36 -0700
commitea6935f966189c65a020b78d1d9921fcd95d6636 (patch)
tree8fc5771ecbf35d85113de99fc7f7cbf01d5560b8
parentb0c2d48d1723aaa2bf1f6582500b91ffce252b34 (diff)
downloadtoolchain-utils-ea6935f966189c65a020b78d1d9921fcd95d6636.tar.gz
toolchain-utils: Use the chromeos_image value computed initially.
When reimaging with a local image, use the chromeos_image value computed during the initial analysis, instead of attempting to recompute it at each use. The recomputation at the verification stage was also incorrect. BUG=b:79376118 TEST=Tested with crosperf and two local images. The script correctly switches between images and it doesn't fail during the reimaging step. Change-Id: Ie40ed52999ecbebb4e2f5dd3e0aa78a18482533a Reviewed-on: https://chromium-review.googlesource.com/1058181 Commit-Ready: Gabriel Marin <gmx@chromium.org> Tested-by: Gabriel Marin <gmx@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org>
-rwxr-xr-ximage_chromeos.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/image_chromeos.py b/image_chromeos.py
index 581b4eab..3d9c1809 100755
--- a/image_chromeos.py
+++ b/image_chromeos.py
@@ -242,16 +242,6 @@ def DoImage(argv):
os.path.realpath(options.chromeos_root), 'src')
real_chroot_dir = os.path.join(
os.path.realpath(options.chromeos_root), 'chroot')
- if local_image:
- if located_image.find(real_src_dir) != 0:
- if located_image.find(real_chroot_dir) != 0:
- raise RuntimeError('Located image: %s not in chromeos_root: %s' %
- (located_image, options.chromeos_root))
- else:
- chroot_image = located_image[len(real_chroot_dir):]
- else:
- chroot_image = os.path.join(
- '~/trunk/src', located_image[len(real_src_dir):].lstrip('/'))
# Check to see if cros flash will work for the remote machine.
CheckForCrosFlash(options.chromeos_root, options.remote, log_level)
@@ -320,7 +310,6 @@ def DoImage(argv):
machine=options.remote)
logger.GetLogger().LogFatalIf(ret, 'Writing checksum failed.')
- chroot_image = FindChromeOSImage(image, options.chromeos_root)
successfully_imaged = VerifyChromeChecksum(
options.chromeos_root, chroot_image, options.remote, log_level)
logger.GetLogger().LogFatalIf(not successfully_imaged,