Commit Graph

66 Commits

Author SHA1 Message Date
Hung-Te Lin
d7a3503914 crosutils/make_universal_factory_shim.sh: allow creating images in arbitrary layout
We need more flexible image creation tool for various layout, like "RMA with
multiple release images" which needs 4 images (install, test, release A,
release B).

To make the creation of image more flexible, this CL changes
make_universal_factory_shim to using a "layout file" that can describe any disk
image format we want.

Image creation speed is also improved by aligning partition offsets and
restricting oflag=dsync applied only when being used for block devices so that
make_universal_factory_shim (outputs to a normal temporary file) becomes faster
by utilizing system cache.

For a system with every images already cached:
 - Time for building 3 in 1 factory instal shim:
   Before = 8 seconds, After = 5 seconds.
 - Time for full RMA shim creation:
   Before = 1m25s, After = 40-50 seconds.

BUG=chrome-os-partner:4108
TEST=./make_universal_factory_shim.sh image1 image2 image3 image4
     # boots correctly after being imaged to SD card.
     ./make_factory_package.sh --usbimg RMA ....
     # RMA image can install images and works correctly

Change-Id: I645196d6d6e0a24d3dfa4c413a338279df4c0d5b
Reviewed-on: http://gerrit.chromium.org/gerrit/6893
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-08-31 23:37:55 -07:00
Zdenek Behan
2811c16f55 crosutils: globally replace enter_chroot with cros_sdk
"cros_sdk" is a drop-in replacement of enter_chroot.sh. The only
important difference is in the calling path, specifically that
cros_sdk is in path but has to be called from $(pwd) being inside the
repo checkout, while enter_chroot.sh is called by explicit path.

Invariably, "./enter_chroot.sh" can be replaced, as pwd=src/scripts.
Calling by absolute path can be replaced by first changing directory
anywhere into the repo checkout, and then calling cros_sdk.

BUG=chromium-os:18750
TEST=run them

Change-Id: Ieff91a27bb419e1121361d5b3a11e4c87ff7a087
Reviewed-on: http://gerrit.chromium.org/gerrit/6273
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
2011-08-19 15:35:32 -07:00
Hung-Te Lin
28a753b22c crosutils: refine factory and imaging scripts
In order to support building arbitrary image, the partition copying scripts has
been changed to support "copying partitions in same size" and "overwriting
partitions in different size", and "copying partition from external file".

We need these APIs to create disk/usb image with release images that is using
partition with different size (ex, recovery images).

Image copying buffer selection and disk image creation time are also improved.

BUG=chromium-os:15050
TEST=./make_factory_package.sh ... --diskimg preimage.bin
     ./make_factory_package.sh ... --usbimg rma.bin
     ./make_factory_package.sh ...  # omaha mode

Change-Id: I6a4c820abf59e780985c95dc35f9340b347bd952
Reviewed-on: http://gerrit.chromium.org/gerrit/5981
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-08-15 21:58:23 -07:00
Hung-Te Lin
5c67986738 make_factory_pack: auto detect release image type (--detect_release_image)
The release image parameter must be an image signed for SSD booting. This CL
adds detection code and allows on-the-fly conversion from recovery to SSD image.

BUG=chromium-os:15050
TEST=./make_factory_package --release RECOVERY --factory FACTORY # success
     # Seeing: INFO    : Image type is [recovery]:...
     ./make_factory_package --release USB --factory FACTORY # success
     # Seeing:  Image type is [usb]:...
     ./make_factory_package --release SSD --factory FACTORY # success
     # Seeing:  Image type is [ssd]:...
     ./make_factory_package --release GARBAGE --factory FACTORY # failure
     # Seeing:  Image type is [invalid]:...
     ./make_factory_package --release GARBAGE --factory FACTORY --nodetect_release_image # success
     # No image type messages

Change-Id: I8530b3f58574a4298b4d6d904a12bb92636c7365
Reviewed-on: http://gerrit.chromium.org/gerrit/5965
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-08-15 21:40:55 -07:00
Hung-Te Lin
40b5b87d98 crosutils: change mk_memento_images.sh to support arbitrary input source
When we want to separate kernel and rootfs, there must be a more flexible syntax
to assign input source.

The partition info parsing code is also improved to detect errors.

BUG=chromium-os:15050
TEST=./make_factory_package --release RECOVERY --factory FACTORY

Change-Id: Ie74b3e23117480a7f503488b39dedceadbfb41e3
Reviewed-on: http://gerrit.chromium.org/gerrit/5962
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-08-14 22:56:48 -07:00
Chris Sosa
e8ff2e848e Fix bug where we crash if our non -9 kill fails.
BUG=chromium-os:19154
TEST=Ran cros_stop_vm

Change-Id: I7150481649086e535469009c207c6fee7bb1990c
Reviewed-on: http://gerrit.chromium.org/gerrit/5972
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-08-14 17:47:35 -07:00
David James
4e098db36f Close fds in RunCommand to prevent children from inheriting file handles.
RunCommand should only pass in stdin, stdout, and stderr to processes,
not other file handles. Fixing this prevents issues where child
processes can cause the parent to hang by forgetting to close the
file handle when launching daemons.

BUG=chromium-os:18104
TEST=Buildbot run with smoke suite. Unit tests.

Change-Id: Ib85095e1fb592ef05a972a5412348363049e6d86
Reviewed-on: http://gerrit.chromium.org/gerrit/4673
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-25 13:31:30 -07:00
Hung-Te Lin
e7ea070644 make_factory_package: allow updating HWID for image creation
BUG=chromium-os:16733
TEST=./make_factory_package --release RELEASE \
     --factory FACTORY --hwid HWID_UPDATER \
     --diskimg IMAGE_FILE

Change-Id: I1a817e1f176d22d830bf0ce8a6ccb6956086f749
Reviewed-on: http://gerrit.chromium.org/gerrit/3306
Reviewed-by: Jay Kim <yongjaek@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-06-30 10:30:43 -07:00
Chris Sosa
237b686be8 Arbitrarily large output can't be used in an exception.
It seems like we are seeing whacky errors with sys.stderr
dying when trying to print out a process and its exception.
I think controlling how the output is printed in RunCommand
is better than passing it with the exception.

Change-Id: I3711575e5d9e710c3aea6ff19d43d149fd83f44c

BUG=chromium-os:14398
TEST=Ran it with au_test_harness

Review URL: http://codereview.chromium.org/6902129
2011-04-28 15:29:12 -07:00
Chris Sosa
c894a0a0a0 Add combine_stdout_stderr as well as make success less verbose.
Change-Id: If46fd1558a00498ce4721dd756532e916f49bc19

BUG=chromium-os:12950
TEST=Ran with autestharness and ran unittests.

Review URL: http://codereview.chromium.org/6877015
2011-04-18 17:19:10 -07:00
Chris Sosa
0d5e4ae006 Add better support for getting the path to crosutils.
Change-Id: I83a56ee38d8d666d3b71b4dc323e26076fab7d96

BUG=chromium-os:13498
TEST=Ran unittests.

Review URL: http://codereview.chromium.org/6765001
2011-03-30 11:22:17 -07:00
Chris Sosa
37cccf3c33 Fix vm lib to work both in/out chroot.
Change-Id: I41ca87d7970ce59c7bbbc0e8cdaeaf5bedb43776

BUG=chromium-os:13498
TEST=Ran it both in/out

Review URL: http://codereview.chromium.org/6750012
2011-03-25 15:58:20 -07:00
Chris Sosa
8d7caa720a Remove au_test_harness code and change symlinks to point to new location
Change-Id: I55a198e09ceac1e05b766864dbc920bfaedffb1f

BUG=chromium-os:11172
TEST=Tested ctest and cros_au_test_harness running from src/scripts
with buildbot params.

Review URL: http://codereview.chromium.org/6717011
2011-03-22 13:17:39 -07:00
Chris Sosa
31b641ec3c Remove test keys from images we test with in the test harness.
Cleaned up _InsertKeyIntoImage to be more general (able to remove key if no key set).  Also made it much more intelligent ... only doing things when it needs to.

Moved mount / unmount code to cros_lib.

BUG=chromium-os:12684
TEST=Ran it a lot ... inspected images after and saw tests pass.

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

Change-Id: Icd96d1178eeabf45a2d5916fbcab8bf7ffba7e21
2011-03-16 16:07:32 -07:00
Chris Sosa
bc4c1574d0 Add logs for update_engine, devserver, and cros_run_vm_update to test artifacts.
Change-Id: Ib5617612be38bb6d7dafcb2edab887c998a676ab

BUG=chromium-os:12951
TEST=Ran it with Simple.  Saw logs generated (1_update) and in root/dev_server.log.  Ran unittests for cros_build_lib.

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=f53a8c7

Review URL: http://codereview.chromium.org/6672007
2011-03-14 13:21:16 -07:00
Chris Sosa
0cc50a4077 Revert "Add logs for update_engine, devserver, and cros_run_vm_update to test artifacts."
This reverts commit f53a8c769b.

TBR=dgarret: revert CL to open tree

Change-Id: I03f80c715e9724f0759edcbeb9535948c9316200
2011-03-11 16:17:50 -08:00
Chris Sosa
f53a8c769b Add logs for update_engine, devserver, and cros_run_vm_update to test artifacts.
Change-Id: Ib5617612be38bb6d7dafcb2edab887c998a676ab

BUG=chromium-os:12951
TEST=Ran it with Simple.  Saw logs generated (1_update) and in root/dev_server.log.  Ran unittests for cros_build_lib.

Review URL: http://codereview.chromium.org/6672007
2011-03-11 15:42:31 -08:00
Chris Sosa
5566eb1f7b Refactor au_test_harness into modules and refactor to use worker design flow.
This CL is a large refactoring that moves the test_harness from using sub-classed classes of au_test into a one where we have the same AU_Test for all test flows but different test workers that operate on different types of machines.  Specifically we move the VM / Real-image specific logic into real_au_worker and vm_au_worker.  There isn't anything functionally different in this change.

Also, we move the classes into their own modules and clean up use of cros_build_lib to be more stylistically correct.

Change-Id: I3e25141174c3d5ba22962bf94365815e69e5bedf

BUG=chromium-os:11172
TEST=Ran with simple and full w/ w/out delta update payloads and with unittest and without unittest keys.  Ran real test using full suite on test device using full update payloads.

Review URL: http://codereview.chromium.org/6597122
2011-03-02 19:24:52 -08:00
Don Garrett
e1b78a7efd Reintroduce RunCommand cleanup and unit tests. Fixed previous issue in which exceptions were thrown if exit_code was set, and added a new unittest to prove that.
This reintroduces the change after commit 3635aaa55e, which reverted 01c8423582.

BUG=chromium-os:11717
TEST=Ran new unit tests, and did full build.

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

Change-Id: I598e459ddaa156af47d47d0482cac16ce44f07a4
2011-03-01 14:22:41 -08:00
Luigi Semenzato
3635aaa55e Revert "RunCommand was catching and rethrowing an exception, which seemed to generate"
This reverts commit 01c8423582.

BUG=chromium-os:11717
TEST=none

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

Change-Id: I4e66e7b2fcf01a4cb35557bdf208f990e6d8eb2b
2011-02-23 19:14:53 -08:00
Don Garrett
01c8423582 RunCommand was catching and rethrowing an exception, which seemed to generate
extra noise in the final exception output.

This change stops catching and rethrowing the same exception, and generally
makes the RunCommand slightly more readable (if longer).

Some unit tests are added, but they only test RunCommand, and not all options
to RunCommand.

BUG=chromium-os:11717
TEST=Manual, and new lib/cros_build_lib_unittest

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

Change-Id: Ibe9b13ff302621e93196008f86914cb65a232d61
2011-02-23 17:36:52 -08:00
Zdenek Behan
18d5703fd7 scripts: use /sbin/ifconfig where appropriate
BUG=n0ne
TEST=cros_au_test_harness

Change-Id: Ic26cc191fdb995b091d910f1c8a46e37085fea72

Review URL: http://codereview.chromium.org/6538067
2011-02-19 00:36:23 +01:00
Zdenek Behan
c264a45ba8 au_test_harness: fix a function call, add sudo in front of ifconfig
Note: sudo before ifconfig is for running on distros which do not
have /sbin or /usr/sbin in common user's paths, like gentoo.

Change-Id: I85bd379ad059d6ecaa8c11f3167fae27987479dd

BUG=5246
TEST=run cros_au_test_harness and see it not fail

Review URL: http://codereview.chromium.org/6541008
2011-02-18 06:06:55 +01:00
Chris Sosa
99768e8e12 Robustify starting of ssh connection to vm updater.
Change-Id: Ia5e0042250da22cebadfd48d143f21597bcada5d

BUG=chromium-os:11716
TEST=Ran vm test and vm update scripts.

Review URL: http://codereview.chromium.org/6413019
2011-02-07 09:02:22 -08:00
Greg Spencer
798d75f3be This starts to fix the scripts so that they load from /usr/lib/crosutils
from within the chroot.

It also fixes a number of style issues.

It changes the meaning of cros_workon "list-all" to list all available
packages, and adds "list-live" to list all live packages.

It changes things that load chromeos-common.sh from the installer to
load it from /usr/lib/installer.

BUG=chromium-os:4230
TEST=synced, rebuilt chroot, made packages, made images, built chrome
from source, and wrote an image to a USB stick.

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

Change-Id: I90c34420af1a64020402bafef8e9e77f56837c02
2011-02-01 22:04:49 -08:00
Mandeep Singh Baines
f9ea0036fa cros_workon: collapse cros_workon_common.sh
cros_workon is the only user of cros_workon_common.sh

This is pre-requisite to moving cros_workon into devutils.git

BUG=11507
TEST=Ran ./cros_workon --board x86-generic --all list

Change-Id: I1eab551ab33646360e507328932c151a0d36f50a

Review URL: http://codereview.chromium.org/6347052
2011-01-31 16:13:30 -08:00
Chris Sosa
f2ee5f6871 Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=c418a8f

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=be787f3

Review URL: http://codereview.chromium.org/6277015
2011-01-26 11:38:14 -08:00
Chris Sosa
404bfdf073 Revert "Passes cache location to tests and runs the tests in parallel."
This reverts commit be787f3525.

Revert "Fix sudo again."

This reverts commit 0f411ec7d9.

TBR dgarrett

BUG=
TEST=

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

Change-Id: I2fb9ca4967ff173c17840b96eb68b02ff2b7774a
2011-01-25 18:16:55 -08:00
Chris Sosa
be787f3525 Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=c418a8f

Review URL: http://codereview.chromium.org/6277015
2011-01-25 17:16:56 -08:00
Chris Sosa
27729c7dbf Revert "Passes cache location to tests and runs the tests in parallel."
This reverts commit c418a8fce7.

TBR=open tree

Change-Id: I471d186fca9084fd18858998b4bcf8cb1de19f14
2011-01-25 15:12:39 -08:00
Chris Sosa
c418a8fce7 Passes cache location to tests and runs the tests in parallel.
As a warning, this is a pretty big change.  At a high-level,
this changes the harness to move the managing of the devserver from
image_to_live into the actual test harness.  Paths of the cache locations (for
archive_url) are taken when pre-generating the updates and stored
in a dictionary (maps "path_to_base->path_to_target" (or path for full updates)->
cache paths).

This change also has the tests run in parallel.  Because we now start
X number of VM's at once, each VM needs it's own pid file and ssh_port.
This logic was added as well as running the actual tests in parallel.

Change-Id: I1275d79740c50c2a8028489b43dcbbcf5bbd56c4

BUG=chromium-os:10723
TEST=Ran it ... a lot with -q but without a test_prefix (so full test suite).

Review URL: http://codereview.chromium.org/6277015
2011-01-25 13:49:29 -08:00
Don Garrett
3343f56b77 Add a verbose option to RunCommandCaptureOutput. Not used yet, does not
dump output until after the command has finished, so not useful for
following 'live'.

Change-Id: Ia8562f5e6f8d7ed8af7e188faa68f5cdbba487c6

BUG=chromium-os:11164
TEST=None

Review URL: http://codereview.chromium.org/6296013
2011-01-21 16:06:51 -08:00
Don Garrett
83d063b670 Pass along RunCommandException correctly. This is a minor
fix, but it leads to better error messages from ctest.

Change-Id: I624ad805ef037b022e6e67b56f0ed10ca05fe325

BUG=11096
TEST=Test currently in progress.

Review URL: http://codereview.chromium.org/6257007
2011-01-20 11:44:41 -08:00
Don Garrett
e70ccb91b1 Use different proxy ports, and log port conflicts. Hopefully works around
build problems, and will give better diagnostics if not.

Change-Id: I2f7a5d9b2e0c63a8189ad212125c7a5c0178c3c4

BUG=10567
TEST=

Review URL: http://codereview.chromium.org/6331007
2011-01-19 13:41:23 -08:00
Hung-Te Lin
4653cbd0e5 crosutils/make_factory_package.sh: support full SSD image as target outside chroot
When running outside chroot, we should use locate_cgpt + "$GPT" to invoke cgpt;
otherwise it may be not in system PATH.

For dealing with a true SSD image (over USB, for example) this CL also improved
data writing speed from <2M/s to 8M/s+ (over USB).

BUG=chromium-os:10531
TEST=./make_factory_package.sh \
  --factory=../build/images/x86-mario/latest/chromiumos_factory_image.bin \
  --release=../build/images/x86-mario/latest//chromiumos_image.bin \
  --diskimg=/dev/sdb

Also tested:
  --diskimg=blah # local file
  (chroot) --diskimg=/dev/sdd
  (chroot) --diskimg=blah

Change-Id: I647d97fe388f5b6a6223fa8cacfecdf00265f60c

Review URL: http://codereview.chromium.org/6261003
2011-01-13 16:59:42 +08:00
Nick Sanders
607c0780c0 Allow disk image target for copy machine.
BUG=10531
TEST=build and imaged a mario

Change-Id: I60790f178159d707f610ba1668c29179a6c32e61

Review URL: http://codereview.chromium.org/6050006
2010-12-28 22:27:11 -08:00
Chris Sosa
4e32890c9b Add new script to stop a kvm using vm library and use in harness.
Change-Id: Ie80843a7b81a37b41ae19fc33244b5c0b8152282

BUG=chromium-os:10434
TEST=Ran it with full au test harness (still running but already showing promise).

Review URL: http://codereview.chromium.org/5988006
2010-12-21 14:56:32 -08:00
Chris Sosa
40fa0ded27 Fixes to get ctest up and running again.
We had a major issue because the latest dev channel release pre-dates the virtio change.  Because of this, ctest was connecting to update that channel using virtio (which is unsupported for that).  This change drops a file telling the vm lib to use e1000 as before.

Also, fixed stateful change logic.

Change-Id: I394a8cece71bdd0d55efa21ba5b6d24804432c6b

BUG=chromium-os:10434
TEST=Ran it with ctest and cros_au_test_harness on images with/without the file.

Review URL: http://codereview.chromium.org/5928005
2010-12-17 13:15:05 -08:00
Don Garrett
8be02f96b6 Create a transparent proxy for test programs to use, with the
ability to filter or manipulate content as it's passed through.

Create two example tests using this utility that cause
updates to close early to test resumes, and to add delays
to make sure the update still completes correctly.

What other tests should be created for this?

BUG=chromium-os:8207
TEST=Run by hand

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

Change-Id: Iefb8c8e223fb2ba6bad2c551f7c4403a0bec6ecf
2010-12-09 15:54:11 -08:00
Chris Sosa
4a5d7d9858 Wait for child to exit after killing it.
Use general purpose wait in case your connecting to a vm
that you didn't start.

Change-Id: Ie67e2d3235882d372d04e4a44d0781ddfc8d4645

BUG=chromium-os:10121
TEST=Ran it, caused some crashes.  Still ran test after retries.

Review URL: http://codereview.chromium.org/5757001
2010-12-09 15:46:09 -08:00
Chris Sosa
53ac954a36 Add some desired options to the au test harness.
Adds verbose flag to print output while updates are running rather than on error.
Adds test_prefix to specify a prefix of tests you want to run
Flushes stderr more reliably for builders and debugging purposes
Dies when stateful_updates fail

Change-Id: I9e4289deec3688c52b92763eee9334a8868f948e

BUG=chromium-os:6910
TEST=Ran with test_prefix and verbose on and off

Review URL: http://codereview.chromium.org/5573007
2010-12-09 11:29:31 -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
Don Garrett
cd33866c89 Add RunCommandCaptureOutput as a helper method.
It's like RunCommand, but you can run the command, capture it's error code and output together.

This is to support tests that need to capture output of image_to_live, and to know if it succeeded.

Change-Id: If674b6d79697c0f0b5c96be9fc83adbed9b9893e

BUG=chromium-os:9502
TEST=Ran by hand

Review URL: http://codereview.chromium.org/5339006
2010-11-29 13:30:42 -08:00
Thieu Le
ac13647eda Change _ArchiveTestResults to upload to Google Storage
BUG=chromium-os:8364
TEST=

Change-Id: Icecc8268fa2c12c8413caa2879785f00e4be5a0a

Review URL: http://codereview.chromium.org/4864001
2010-11-24 10:42:32 -08:00
Hung-Te Lin
062947926e cros_utils: refine factory and imaging related scripts
Major changes are:
 - prefix functions in cros_image_common with 'image' to avoid naming conflicts
 - use awk to replace grep+sed+cut
 - use case to handle board name list
 - factory_setup.sh should return error if applying patch failed
 - refine for shell script coding style guide:
   * replace `` with $()
   * quote variables
   * replace "! -z" by "-n"
   * no space between redirection symbol (>) and target name (eg, >>filename)
   * 1> should be simply >
   * no trailing \ for && and ||

BUG=chrome-os-partner:1583
TEST=manually verified:
 ./image_to_usb.sh --factory # calls mod_image_for_test --factory, and works fine
 ./make_factory_package.sh --factory PATH_TO_IMAGE --release PATH_TO_IMAGE ...
  # factory payloads were created successfully

Change-Id: I6bb10bdfb12cbdb14e9816b3ad72dfe4b7b0472f

Review URL: http://codereview.chromium.org/5168001
2010-11-18 14:47:38 +08:00
David James
d87170bb7b Fix infinite loop when FindRepoDir argument is a relative path.
This bug doesn't affect production but affects the unit tests.

BUG=chromium-os:9201
TEST=Confirmed this fixes an infinite loop in the unit tests, and that
    cbuildbot.py still works.

Change-Id: I1a56b92d8229110c84cebbe877e55fb99f053212

Review URL: http://codereview.chromium.org/5025002
2010-11-15 18:57:19 -08:00
David James
b49c6df754 Add more error checking to preflight queue.
What's new?
  - cros_mark_as_stable now exits with errors if directories are specified
    that don't exist.
  - cbuildbot.py always explicitly specifies overlay directories so
    cros_mark_as_stable can rely on them existing.
  - Package names and paths are now separated with colons instead of
    spaces, so as to allow for us using the same syntax with
    enter_chroot.sh as we use without the same script. (enter_chroot.sh
    mucks with command-lines that contain spaces or quotes.)
  - cbuildbot.py now ensures its build path is a absolute path. This ensures we don't kill the wrong processes, if, for instance, the buildpath is '../..'
  - All buildbots now explicitly specify what overlays they want to rev. Public buildbots only rev public ebuilds and private buildbots now only rev private ebuilds.

BUG=chromium-os:8647
TEST=Ran unit tests. Manually marked packages as stable. Ran cbuildbot.py test run.

Change-Id: I1df6d428973d91329c4f5159e2886889a3ebb7c7

Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=795bd30

Review URL: http://codereview.chromium.org/4442001
2010-11-15 13:06:42 -08:00
Hung-Te Lin
bcc60b625d crosutils: move image_common.sh to lib/cros_image_common.sh
The team is moving utility/library scripts into 'lib' folder.
image_common.sh should follow this policy.

Also refined the parameter check of mk_memento_images.sh

BUG=chromium-os:5208
TEST=./make_factory_package.sh --factory PATH_TO_FACTORY --release PATH_TO_RELEASE;
     # factory bundle created successfully
     ./mk_memento_images.sh PATH_TO_PART2 PATH_TO_PART3
     # update.gz created successfully
     ./mk_memento_images.sh PATH_TO_IMGE 2 3
     # update.gz created successfully

Change-Id: I3afecf05da2832986723f28b595045d0540ea9e9

Review URL: http://codereview.chromium.org/4825004
2010-11-13 05:36:20 +08:00
Ken Mixter
08145697a5 crosutils: Add vnc view of tests running multiple tests for VM tests
Change-Id: I87c41e60797848192cee1f0c165215fcec8f5bd2

BUG=8850
TEST=Ran a few tests including suite_Smoke

Review URL: http://codereview.chromium.org/4647001
2010-11-08 18:10:08 -08:00
Darin Petkov
4b029a27f8 VM: Use -serial none in no-graphics kvm mode...
...so that the console doesn't get messed up due to the serial port being
redirected from stdin.

BUG=8729
TEST=./bin/cros_run_parallel_vm_tests suite_Smoke suite_Smoke; checked console

Change-Id: I5a0cedba2b0ac7f453b4574666c645e84b30b379

Review URL: http://codereview.chromium.org/4501001
2010-11-04 14:06:57 -07:00