[autotest] Automatically sparse files greater than 512MB for... [chromiumos/third_party/autotest : master]

68 views
Skip to first unread message

Dan Shi (Gerrit)

unread,
Mar 9, 2016, 6:33:56 PM3/9/16
to Shuqian Zhao, Paul Hobbs
Dan Shi has uploaded a new change for review.

https://chromium-review.googlesource.com/332061

Change subject: [autotest] Automatically sparse files greater than 512MB
for fastboot call
......................................................................

[autotest] Automatically sparse files greater than 512MB for fastboot call

When flash large image files, e.g., system.img, fastboot might fail due
to the size limit. For example, fastboot call will post following
warning:
target reported max download size of 536870912 bytes

system.img file larger than that may fail the flash attempt. To make the
flash more reliable, pass `-s 512M` to fastboot command so it can
automatically sparse files greater than 512MB.

BUG=b:27463702
TEST=local run test

Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
---
M server/hosts/adb_host.py
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/server/hosts/adb_host.py b/server/hosts/adb_host.py
index 4855864..2f42e52 100644
--- a/server/hosts/adb_host.py
+++ b/server/hosts/adb_host.py
@@ -1155,7 +1155,8 @@
if image not in ANDROID_IMAGES:
continue
logging.info('Flashing %s...', image_file)
- self.fastboot_run('flash %s %s' % (image[:-4], image_file))
+ self.fastboot_run('-S 512M flash %s %s' %
+ (image[:-4], image_file))
if image == ANDROID_BOOTLOADER:
self.fastboot_run('reboot-bootloader')
self.wait_up(command=FASTBOOT_CMD)

--
To view, visit https://chromium-review.googlesource.com/332061
To unsubscribe, visit https://chromium-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Dan Shi <ds...@google.com>

Dan Shi (Gerrit)

unread,
Mar 9, 2016, 6:34:14 PM3/9/16
to chromium-...@chromium.org
Dan Shi has posted comments on this change.

Change subject: [autotest] Automatically sparse files greater than 512MB
for fastboot call
......................................................................


Patch Set 1: Verified+1 Trybot-Ready+1
Gerrit-MessageType: comment
Gerrit-Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Dan Shi <ds...@google.com>
Gerrit-Reviewer: Dan Shi <ds...@google.com>
Gerrit-HasComments: No

Dan Shi (Gerrit)

unread,
Mar 9, 2016, 6:35:00 PM3/9/16
to Kris Rambish, Simran Basi, Ang Li
Dan Shi has posted comments on this change.

Change subject: [autotest] Automatically sparse files greater than 512MB
for fastboot call
......................................................................


Patch Set 1:

I'm not sure if we should set -S by default.

Ang, is that OK?
Gerrit-MessageType: comment
Gerrit-Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Dan Shi <ds...@google.com>
Gerrit-Reviewer: Ang Li <an...@google.com>
Gerrit-Reviewer: Dan Shi <ds...@google.com>
Gerrit-Reviewer: Kris Rambish <kr...@chromium.org>
Gerrit-Reviewer: Simran Basi <sb...@chromium.org>
Gerrit-HasComments: No

Simran Basi (Gerrit)

unread,
Mar 9, 2016, 8:34:40 PM3/9/16
to Dan Shi, Kris Rambish, ChromeOS bot, Ang Li
Simran Basi has posted comments on this change.

Change subject: [autotest] Automatically sparse files greater than 512MB
for fastboot call
......................................................................


Patch Set 1: Code-Review+2
Gerrit-MessageType: comment
Gerrit-Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Dan Shi <ds...@google.com>
Gerrit-Reviewer: Ang Li <an...@google.com>
Gerrit-Reviewer: ChromeOS bot
<3su6n15k...@developer.gserviceaccount.com>

Dan Shi (Gerrit)

unread,
Mar 10, 2016, 12:10:04 PM3/10/16
to Kris Rambish, ChromeOS bot, Ang Li, Simran Basi
Dan Shi has posted comments on this change.

Change subject: [autotest] Automatically sparse files greater than 512MB
for fastboot call
......................................................................


Patch Set 1: Commit-Queue+1
Gerrit-MessageType: comment
Gerrit-Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Dan Shi <ds...@google.com>

Dan Shi (Gerrit)

unread,
Mar 10, 2016, 12:35:34 PM3/10/16
to Kris Rambish, ChromeOS bot, Ang Li, Simran Basi
Dan Shi has submitted this change and it was merged.

Change subject: [autotest] Automatically sparse files greater than 512MB
for fastboot call
......................................................................


[autotest] Automatically sparse files greater than 512MB for fastboot call

When flash large image files, e.g., system.img, fastboot might fail due
to the size limit. For example, fastboot call will post following
warning:
target reported max download size of 536870912 bytes

system.img file larger than that may fail the flash attempt. To make the
flash more reliable, pass `-s 512M` to fastboot command so it can
automatically sparse files greater than 512MB.

BUG=b:27463702
TEST=local run test

Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Reviewed-on: https://chromium-review.googlesource.com/332061
Trybot-Ready: Dan Shi <ds...@google.com>
Tested-by: Dan Shi <ds...@google.com>
Reviewed-by: Simran Basi <sb...@chromium.org>
Commit-Queue: Dan Shi <ds...@google.com>
---
M server/hosts/adb_host.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
Simran Basi: Looks good to me, approved
Dan Shi: Ready; Verified; Ready



diff --git a/server/hosts/adb_host.py b/server/hosts/adb_host.py
index fb34da6..8e608f5 100644
--- a/server/hosts/adb_host.py
+++ b/server/hosts/adb_host.py
@@ -1155,7 +1155,8 @@
if image not in ANDROID_IMAGES:
continue
logging.info('Flashing %s...', image_file)
- self.fastboot_run('flash %s %s' % (image[:-4], image_file))
+ self.fastboot_run('-S 512M flash %s %s' %
+ (image[:-4], image_file))
if image == ANDROID_BOOTLOADER:
self.fastboot_run('reboot-bootloader')
self.wait_up(command=FASTBOOT_CMD)

--
To view, visit https://chromium-review.googlesource.com/332061
To unsubscribe, visit https://chromium-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I655e7d5701862a913f79bf7c21211168b53970ce
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/third_party/autotest
Gerrit-Branch: master
Gerrit-Owner: Dan Shi <ds...@google.com>
Reply all
Reply to author
Forward
0 new messages