flatcar-scripts/mod_for_factory_scripts
Hung-Te Lin d32c59fe47 crosutils: build factory test image by emerge commands
The factory test image was created by using rsync from build artifacts
in chroot, which has some concerns:
 - Runtime dependencies of autotest-factory won't be picked into image.
 - If a developer skips build_package and builds image by using only pre-built
   binary packages, he will get nothing in factory test image.
 - It's hard for developers to figure out how and when his changes will be
   merged to next build_image (cros_workon does not really work).
 - Output image will be definitely different for every developers, also the
   official build bots.
 - If developers never wipes his chroot (setup_board), the factory test image
   will grow until out of space. (For example, my environment outputs a 825M
   image while the official buildbot generates only 563M for same ToT source).

This CL changes image build command to using portage emerge, so that output
image can be prepared faster and smaller, and easier for maintenance.

BUG=chromium-os:3335
TEST=./build_packages; ./build_image --factory  # Image starts factory UI successfully
     # Also tried tests in test_list.all, seems fine.

     time ./mod_image_for_test.sh --factory --force_copy --no_inplace
     # time: 3m2s => 1m55s, factory test image data: 825/563M => 378M

     ./build_image --factory_install # factory install shim is also fine

Change-Id: I82b4505c74cd31e718aaff4a319d50b69b2c852c
Reviewed-on: https://gerrit.chromium.org/gerrit/14473
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-01-20 17:54:11 -08:00
..
100rebaseClient crosutils: build factory test image by emerge commands 2012-01-20 17:54:11 -08:00
300modifyDescription Clean var formatting in mod_for_factory 2010-11-17 22:10:16 -08:00
400configAutotest cros_utils: refine factory and imaging related scripts 2010-11-18 14:47:38 +08:00
factory_setup.sh Fix factory patching 2010-11-23 22:03:25 -08:00