Commit Graph

23 Commits

Author SHA1 Message Date
Anush Elangovan
84e72fab23 Revert "Factored out the code to copy an image and modify it for test"
Reverting for now since preflight fails.

This reverts commit 4fc5227fac.

TBR=sjg

Change-Id: I0ada89c15d0f5ecc07cb15b22d4084a37fa4ddb8
2010-12-08 23:22:15 -08:00
Simon Glass
4fc5227fac Factored out the code to copy an image and modify it for test
into mod_image_for_test.sh rather than slightly different versions
of the same in image_to_usb.sh and image_to_vm.sh

Added a function to get a test image into common.sh

Added --inplace option to mod_image_for_test, which is the default,
and preserves the original behaviour. But using --noinplace it will
now do the copy for you.

Found that chromiumos_image.bin appears throughout the scripts, so added it and the test variant to common.sh

BUG=chromiumos-10126
TEST=run mod_image_for_test.sh with and without --noinplace
run image_to_usb.sh and image_to_vm.sh with both options
test on Seaboard that correct image is provided

Really we should have automated testing for these scripts

Change-Id: I5cfa91792c7fded35e7f4ca8f8f27c6b270817fb

Review URL: http://codereview.chromium.org/5271010
2010-12-08 14:22:11 -08:00
Anush Elangovan
0de6de66db Enable virtio for tests
Change-Id: I1d0e546f6ea837928ba426e4690007ef2649f68e

BUG=10102
TEST=test KVM with -net virtio and ensure it boots and can copy files in etc

Review URL: http://codereview.chromium.org/5543006
2010-12-07 17:31:48 -08:00
Chris Masone
7d04c7aacb [crosutils] bump default size of VM disk to allow for bigger stateful partition
BUG=8544
TEST=create an VM image with image_to_vm.sh; the stateful partition should be 2GB in size.

Change-Id: I6c0ee9e2cb513e42c25e4f0d1616835a41f378d7

Review URL: http://codereview.chromium.org/4737001
2010-11-09 08:24:13 -08:00
Chris Sosa
1b11f3813f Add sync after resize to avoid /dev/loop- is busy errors.
Change-Id: I7d38b7f78e5d32744ec3a9e1579d09bd16d64888

BUG=
TEST=Ran it.

Review URL: http://codereview.chromium.org/4108001
2010-10-25 15:10:26 -07:00
Chris Sosa
9fe00b9b13 Use minimums if options are too small.
Change-Id: Icd9402aec8a55c613c8fa12e917bf3fd63272271

BUG=
TEST=Ran it and saw minimums change.

Review URL: http://codereview.chromium.org/3956005
2010-10-22 12:34:16 -07:00
Will Drewry
f929c3012c image_to_vm: fix up the rootfs for mounting rw
Use new helper for accessing a verified rootfs.

TEST=ran image_to_vm and it worked
BUG=tree b0rked

Change-Id: I03c1c55d1e1056081078cbdd8797235636d4845d

Review URL: http://codereview.chromium.org/4023001
2010-10-20 18:48:20 -05:00
Olof Johansson
1688a6d416 Change KVM to use e1000
add -net nic,model=e1000 in start_kvm and in the suggested command as
output by image_to_vm.sh

Signed-off-by: Olof Johansson <olofj@chromium.org>

BUG=none
TEST=Boot an image, run lspci in a terminal, see intel nic

Review URL: http://codereview.chromium.org/3779007

Change-Id: Id7f614adec0ae69b8f4de152832538a13ea4cbad
2010-10-14 19:08:44 -05:00
Chris Sosa
020aa69f37 Fixes for cbuild to work with ctest.
1)  image_to_vm aborts because e2fschk requires a terminal to
be connected in order to check whether or not you want to repair the fs.  Since
we always want this to be true, set -p

2)  Clean up test harness to only verify the number of tests that passed on the
base image are the same on the update back to.  This is because older images
have many tests that fail.  I leave 10% as a reasonable number to pass.

3)  Redirect output from autotest in run_remote_tests to stderr so it gets
logged in a calling script that captures stdout.

Change-Id: If412274353683add20d136747113eb9c2bd41330

BUG=4690, 5533, 7287
TEST=Ran with internal tools for builders.

Review URL: http://codereview.chromium.org/3536018
2010-10-08 16:36:20 -07:00
Chris Sosa
bd61304ebe Pass --board to get_latest_image.sh.
Change-Id: Iaa388bc6dd3ef8b07199ee42de6693cad2f4368f

BUG=
TEST=rm src/scripts/default_board and ran image_to_vm --board x86-generic.

Review URL: http://codereview.chromium.org/3530007
2010-10-04 13:29:23 -07:00
Chris Sosa
45bec936f6 Move vm constants into their own file. This will make it easier to share these constants.
Also fixed get latest image logic in image_to_vm and allowed for using the most recent image in cros_run_vm_test to follow other shell convention of using latest.

Change-Id: I60ed4c03d609500da7f6ae34ef57ba2e32f4b0bb

BUG=
TEST=Tested by running image_to_vm with --full and cros_run_vm_test with suite_Smoke

Review URL: http://codereview.chromium.org/3597001
2010-09-29 15:38:53 -07:00
Olof Johansson
3ed8d12f48 image_to_vm: print launch command for qemu images
Change-Id: Id62c28eac319caf15a2bf83a69b4f727f9e9d56b

BUG=none
TEST=sudo emerge qemu-kvm ; image_to_vm <...> ; cut and paste of output

Review URL: http://codereview.chromium.org/3418031
2010-09-27 13:29:40 -05:00
Chris Sosa
cc09f84b5e Update scripts for vm's
Change-Id: I63bdcaa3630c179d407310f6544c102f5353fa4d

BUG=5530
TEST=Ran both cros_run_vm_test and new script and had the latter update successfully.

Review URL: http://codereview.chromium.org/3427011
2010-09-21 17:09:51 -07:00
Ryan Cairns
a7be5ffcc7 pass --board to mod_image_for_test
... again ...
Change-Id: If4c72eb5ff422a74130a62a10d5705f02849acfe

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3113029
2010-08-23 20:47:07 -07:00
Will Drewry
537caa90c0 Clean up cros_make_image_bootable and image_to_vm
image_to_vm.sh was running chromeos-setimage.  This script
was not meant to be run outside of a CrOS environment, but
its use here predates the cros_make_image_bootable script.

The change converts the rehashing and imaging over to using
cros_make_image_bootable.  The vm image uses the usb boot target but defaults
the usb drive to sda3.

update_bootloaders is fixed to not clobber existing syslinux
templates.

cros_make_image_bootable flag override support was broken and this fixes it.

TEST=build a new image wtih rootfs checking and without and ensure both woth with image_to_vm.  Also make sure they still boot normally on available hardware.
BUG=chromium-os:5939

Review URL: http://codereview.chromium.org/3189018

Change-Id: Ib4ac25f1a76f25ac7ce4538614ba247df9caea91
2010-08-20 20:30:56 -05:00
Tan Gao
0d5f948934 clean up install_gpt args to use number of sectors
Change-Id: I7d17db3cb522a52ec2dac688f4bf83fb5ae6a2d1

related CL: http://codereview.chromium.org/3031049/show

TEST=(1)Manually built an image using build_image script, which exercised "build_gpt.sh"; (2) manually built a Qemu VM image using "image_to_vm.sh" and verified the VM is bootable (up to login screen); (3) manually built a dev recovery image using "mod_image_for_dev_recovery.sh" and verified image functions properly for dev recovery purpose

Review URL: http://codereview.chromium.org/3050039
2010-08-06 08:28:20 -07:00
Tan Gao
97117a9d97 remove obsolete arg kern_img from install_gpt() call
Change-Id: I62a7e85f098327404f52752d85450ff24f2a7e78

Review URL: http://codereview.chromium.org/3014050
2010-08-03 17:01:25 -07:00
Will Drewry
efce66880f image_to_vm: convert to calling setimage directly
The last changes to the installer broke image_to_vm.  Since image_to_vm
doesn't need to run postinst, but just change the active image, it
now just calls chromeos-setimage and passes in its needed flags (already
supported by the last installer change).  It will also detect whether
the image was built with verification of the rootfs enabled or not
by looking at the default.cfg file.

Also updates the location of where you should run the command in
build_image.

TEST=built a new image with --enable_rootfs_verification and started with qemu -curses -hda [output]; did the same without verification
BUG=chromium-os:2963

Review URL: http://codereview.chromium.org/3034030

Change-Id: I265d6ad8971f9427b78cc07d784fced9cceb5974
2010-07-23 19:43:27 -05:00
Rahul Chaturvedi
e79e88eb0e Changes to use the postinst --esp-part-file flag; postinst fixups removed
Added the flags required for mounted images to the postinst call.
Scripts no longer need to fixup postinst hence that code is removed.

Review URL: http://codereview.chromium.org/3027012
2010-07-21 02:04:59 +05:30
Rahul Chaturvedi
e770e16379 Resize stateful partition flag
Added flag to resize stateful partition that we put onto the VM image.

Review URL: http://codereview.chromium.org/2964011
2010-07-15 00:35:11 +05:30
Zelidrag Hornung
478a0d44a4 Renamed VM image to match naming convention of other images.
Review URL: http://codereview.chromium.org/2955014
2010-07-14 11:47:39 -07:00
Zelidrag Hornung
42ca818d3b fixed vm scripts
Review URL: http://codereview.chromium.org/2973005
2010-07-12 18:08:44 -07:00
Rahul Chaturvedi
b5643e8bf6 Final set of VM scripts - integrated with changes from Zelidrag to create a test image if specified.
Integrated comments from http://codereview.chromium.org/2604001/show
[the git repository that commit was on was deleted and replaced, hence this new commit]

Review URL: http://codereview.chromium.org/2803015
2010-07-09 10:46:05 +05:30