mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 22:21:10 +02:00
The recent changes to image_to_usb.sh assumed that chromiumos_image.bin is always used for generating a test image. This wasn't the case before these changes were applied, where a preexisting test image would have sufficed. This fix eliminates image autodetection entirely when --test_image it used and falls back to the old behavior: if a test image exists, it will use it; otherwise, it will generate it from the image specified by --image_name, or from the default chromiumos_image.bin. This is not to say that I like this behavior: it is subtle, may lead to errors (e.g. using a stale test image whereas the user assumes a new one should be generated), and inconsistent with other behaviors (e.g. installing a recovery image, where no image generation takes place at all). I believe that long term we should eliminate the generation of test images from image_to_usb.sh and have users invoke the necessary scripts (like mod_image_for_test.sh) explicitly. BUG=chromium-os:26239 TEST=Ran script with different combinations of --test_image, --image_name and image files present. Change-Id: Ib2491a7e45e23eb51ced6ef31d3f129ec7863a25 Reviewed-on: https://gerrit.chromium.org/gerrit/15764 Reviewed-by: Richard Barnette <jrbarnette@chromium.org> Commit-Ready: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org>
Description
Languages
Shell
93.1%
Python
6.9%