Commit Graph

28179 Commits

Author SHA1 Message Date
Don Garrett
d0473d1e9f Don't pass "" to cros_run_vm_test if vm_graphics_flag isn't set.
This would not have been a problem if "--no_graphics" is used.

Change-Id: I3645391d25d4bb8618109ff5be0ca2fbe8e96a60

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

Review URL: http://codereview.chromium.org/5104006
2010-11-18 16:11:13 -08:00
Chris Sosa
9b054f0f88 Revert "The major change is refactoring to make functions more accessible for other modules."
This reverts commit 118629dae8.

Revert "Remove _ to fix tree."

This reverts commit a74ee71048.

Revert "Missed tracking branch to re-open tree."

This reverts commit 0b9f24e9be.

TBR=davidjames

Change-Id: Ic7057cd2a01e192ec78dd729a1f3eac7835b96c7
2010-11-18 15:57:20 -08:00
Chris Sosa
0b9f24e9be Missed tracking branch to re-open tree.
Change-Id: I2331cb6eda8c49111f30b62c42946952e450741f

TBR=davidjames
2010-11-18 15:31:52 -08:00
Chris Sosa
a74ee71048 Remove _ to fix tree.
Change-Id: I62a94f8d66ce9b133eda6c085da5e4957ff74796

BUG=
TEST=

Review URL: http://codereview.chromium.org/5138006
2010-11-18 15:05:45 -08:00
Chris Sosa
118629dae8 The major change is refactoring to make functions more accessible for other modules.
Besides changing a lot of _ to not _, I added lots of docstrings, moved things around,
factored out the Marking component of the EBuildStableMarker (for use with other CL),
and fixed the version logic.

The versioning logic was too hacktastic.  So I took a note from David's changes to
take the information from pkgsplit rather than doing the ugly parsing I was doing before.
This is much more robust in the case of no _r*'s and _rc or _alpha*, etc.

Used in http://codereview.chromium.org/4798001/

BUG=chromiumos:8693
TEST=Ran unit tests and chrome mark as stable.  Will run some more tests.

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

Change-Id: Id6ef9a480591d1a28352f360c6d076564b43e318
2010-11-18 14:35:59 -08:00
Chris Sosa
2798f3c3cc Revert "Remove the dependency to autotest_run.sh so I can get rid of it in next CL."
This reverts commit 983fdb5a2d.  TBR to ericli

BUG=
TEST=

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

Change-Id: Ibf9f94f814abacb4cdaaeb815f944bd943a0dd9a
2010-11-18 11:10:08 -08:00
Eric Li
983fdb5a2d Remove the dependency to autotest_run.sh so I can get rid of it in next CL.
Change-Id: I1032932b696929fccf97f911c555ec5a24f589d4

BUG=9291
TEST=Run storageFio test since it need prebuild test and deps.

w/wo emerge autotest
w/wo cros_workon
in/outside of chroot.

and all its combinations.

Review URL: http://codereview.chromium.org/5188002
2010-11-18 10:28:10 -08:00
Hung-Te Lin
df4fc212a8 crosutils: fix "umount: /tmp/XXX: not mounted" in build_image
The update_bootloaders needs to unmount file system first for syslinux to
manipulate the raw device file, but the real "umount+losetup -d" in
cleanup stage would cause failure.

This CL remounts partition again so that cleanup can be executed
successfully.

BUG=chromium-os:9278
TEST=Manually executed ./build_image;
 Before fix: seeing "umount: /tmp/esp.2q8fSn: not mounted" in last page.
 After fix: no such error.
 The output image is verified to be bootable successfully.

Change-Id: I19e2e062ad814e7bcd54777b5c3cee31f2b92e81

Review URL: http://codereview.chromium.org/5165001
2010-11-18 17:27:17 +08:00
David McMahon
24f6e35428 Created branch 0.9.120.B. Update CHROMEOS_VERSION_BRANCH=121
Change-Id: I4d991f0c320f71075d80196bbf96c4e1b18a8439
2010-11-17 23:22:55 -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
Nick Sanders
711efd8aec Clean var formatting in mod_for_factory
BUG=chrome-os-partner:1583
TEST=built factory image

Change-Id: Icc15295ca3ce6113ea22a988e2e755ab513a43de

Review URL: http://codereview.chromium.org/5219001
2010-11-17 22:10:16 -08:00
Nick Sanders
f57f1166cd Trigger factory from udev-addon
Change-Id: I8a9df6ff7be3edb8160541409f15fa7b8ee7b725

BUG=7535
TEST=

Review URL: http://codereview.chromium.org/4259002
(cherry picked from commit 18897f619deaa8067c57dc7575c3de2445f58aa9)

Review URL: http://codereview.chromium.org/5116005
2010-11-17 21:55:02 -08:00
Don Garrett
a82ac9aba5 Add --payload option to take advantage of the new option for devserver.
Change-Id: Icdd0a809a2f5aeaedccb2ed421984d9f298f181b

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

Review URL: http://codereview.chromium.org/5103004
2010-11-17 18:20:24 -08:00
Mandeep Singh Baines
4ea330f007 build_image: honor USE flags from environment
BUG=n0ne
TEST=Ran the following command to test:

USE="-compat_wireless" ./build_image

Change-Id: I4b3fd12c1f62e1b2551045a5831a63d848fe2a3f

Review URL: http://codereview.chromium.org/5139003
2010-11-17 18:11:58 -08:00
Chris Sosa
684d5dbccf Add retries to pfq push.
Change-Id: Ie4632acf22bedb0c94de0cb3fe67b549fc2d0871

BUG=chromium-os:9323
TEST=Ran it and inserted exception for push_try < 3 and
mocked out push.

Review URL: http://codereview.chromium.org/5142003
2010-11-17 17:48:26 -08:00
Nick Sanders
a436eb8ef6 Add per board customization, clean up private autotests.
BUG=1583
TEST=actually builds

Change-Id: I6510f30faf3f3c2e88b4ea9c63985c09086e1a5d

Review URL: http://codereview.chromium.org/4482001
(cherry picked from commit afba119639afe0fb8206e58ead091f2efd114192)

Allow branch customization for factory

BUG=1583
TEST=removes superfluous files

Change-Id: I576fc0dd811f9c1ed6299a539e0e8a014b37bdc8

Review URL: http://codereview.chromium.org/4376001
(cherry picked from commit 08fdc9da26456c286254c250366bdfc738f8ed38)

No pagecycler for factory image

BUG=1583
TEST="build, no pagecycler in factory."

Change-Id: I43d23de5d518634697e17a32bcd94a43aad46aba

Review URL: http://codereview.chromium.org/4342002
(cherry picked from commit f3e98785f3ed3f4e87e4287ee3ec45e2fc737c89)

Review URL: http://codereview.chromium.org/5091002
2010-11-17 16:50:02 -08:00
David McMahon
765d7c2180 Created branch 0.9.118.B. Update CHROMEOS_VERSION_BRANCH=119
Change-Id: Ia2a698501ad1532f6a3936bdb9d97a639431afcc
2010-11-17 16:39:55 -08:00
Paul Stewart
f7597abb17 Use new stateful image builder
Also change download filenames

BUG=chromium-os:9308
TEST=Run script

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

Change-Id: Id9ed150184559ab31274dc3b4f58bf9fe0a0f76c
2010-11-17 16:22:28 -08:00
Raja Aluri
8f2a9950b9 passing CHROMEOS_RELEASE_APPID to the PASSTHRU list into chroot
Change-Id: Ib5296eb4d3eea6d2430cde04d855ccbefd507bf4

BUG=
TEST=

Review URL: http://codereview.chromium.org/5132002
2010-11-17 15:03:00 -08:00
Gaurav Shah
dc4a6446e9 Set success=1 for the recovery kernel
This will prevent the firmware from updating the tries flag on a USB recovery image.

Change-Id: I47bf276eab5b40ae54b732d0e082e4c9f58bfed3

BUG=chromium-os:6550
TEST=build_package, build_image, cgpt show recovery_image.bin (successful flag should be set to 1)

Review URL: http://codereview.chromium.org/4979007
2010-11-17 14:11:43 -08:00
David McMahon
b08d47ca16 Created branch 0.9.116.B. Update CHROMEOS_VERSION_BRANCH=117
Change-Id: Ia92bacb78ae6f54afea52e02cc93b548ee0a4cfb
2010-11-16 21:41:52 -08:00
Raja Aluri
e891eea06f passing CHROMEOS_RELEASE_APPID to the PASSTHRU list into chroot
Change-Id: I906f1959769ac9d7a2abc04827cad8f5201984de

BUG=chromeos:9168
TEST=Made sure that setting and unsetting this value and enter_chroot is honoring the pass thru setting.

Review URL: http://codereview.chromium.org/5008006
2010-11-16 20:12:56 -08:00
Nick Sanders
867fde26b7 Allow RO rootfs and writeable stateful.
BUG=9423
TEST=mount an image --safe, rootfs OK

Change-Id: I4bc48e742e2438a1d2cae17c752743e02bd124fd

Review URL: http://codereview.chromium.org/4974006
2010-11-16 20:05:06 -08:00
David James
d4993a7311 Don't use output argument for CalledProcessError (Python 2.7 only)
Also add _Print statement so that stdout is printed.

BUG=chromium-os:9257
TEST=Run cros_mark_as_stable.py clean / commit

Change-Id: I9a01d6369d4b14ca0be812b8b1509c8375b1d575

Review URL: http://codereview.chromium.org/5063004
2010-11-16 15:47:25 -08:00
Scott Zawalski
085b5d8fba Merge branch 'master' of ssh://gitrw.chromium.org:9222/crosutils 2010-11-16 10:24:49 -08:00
David James
8ce0100b03 Retry in parallel_emerge for 5xx error codes.
When the server returns a 5xx error code, we should retry. Such errors are
often due to flakiness, so retries resolve the issue.

BUG=chromium-os:9217
TEST=Tested parallel_emerge with fake URL to verify it retries.

Change-Id: Ie5cf003562b5261005be9929624769394b4802a1

Review URL: http://codereview.chromium.org/5056003
2010-11-16 10:20:08 -08:00
Scott Zawalski
b593c39e9d Add a RevGitWithRetry method to retry repo sync and git push
Modify repo sync to just sync the repo we are in,
this is what preflight does and is a proven acceptable approach over
the complete 'repo sync' approach.

BUG=8987
TEST=Ran retry command over dummy directories to be sure it retries
as expected.

Review URL: http://codereview.chromium.org/5082002
2010-11-16 10:00:07 -08:00
Scott Zawalski
4e85f966a4 Check value in except 2010-11-16 09:48:09 -08:00
Scott Zawalski
01c62e5da6 Add in sleep between retries 5 seconds * retry 2010-11-16 09:27:17 -08:00
Scott Zawalski
3309df01c8 Merge branch 'master' of ssh://gitrw.chromium.org:9222/crosutils 2010-11-16 09:14:22 -08:00
Scott Zawalski
ec41e52159 Remove superfluous space 2010-11-16 09:14:10 -08:00
Scott Zawalski
93954efeda Add a RevGitWithRetry method to retry repo sync and git push
Modify repo sync to just sync the repo we are in, this is what preflight
does and is a proven acceptable approach over the complete 'repo sync' approach.

BUG=8987
TEST=Ran retry command over dummy directories to be sure it retries
as expected.
2010-11-16 09:12:01 -08:00
Raja Aluri
2d9f97232f Created branch 0.9.114.B. Update CHROMEOS_VERSION_BRANCH=115
Change-Id: Ic4f7e18815a65fcceb60d4584150abea6164aa30
2010-11-15 22:45:05 -08:00
David James
77f281a75e Move sanity checks for missing directories until after checkout happens.
Preflight clean needs to wait until after the checkout happens before
it asserts that all of our overlays exist.

BUG=chromium-os:9197
TEST=Ran cbuildbot.py with missing chromiumos-overlay dir

Change-Id: If66574f01d1e85741e971919a9fa2da34f85872d

Review URL: http://codereview.chromium.org/5069001
2010-11-15 20:39:00 -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
f7502a6e03 Special-case preflight clean to allow for missing directories.
If there's no directory, I guess things are really, really clean.

BUG=chromium-os:9197
TEST=Ran cros_mark_as_stable.py clean with missing overlay directories.

Change-Id: I3f4811fe01bca56e850f823a973476884292e278

Review URL: http://codereview.chromium.org/4988004
2010-11-15 18:09:10 -08:00
Chris Sosa
4e75efa930 Add option to check version of Chrome on target.
Change-Id: I34e9d64656e04d4f5c477914512219d9b8563b78

BUG=chromium-os:9137
TEST=Ran with both wrong and right versions against a Google Chrome and
Chromium build

Review URL: http://codereview.chromium.org/4942001
2010-11-15 15:12:06 -08:00
Paul Stewart
b94e40293d Add port flag to remote_rsync_from
Ass ${FLAGS_ssh_port} to ssh arguments for rsync

BUG=chromium-os:9187
TEST=Run rsync-related script with port argument

Change-Id: Iefabef230cfff03dcd66ac0c24798bb4b13ce40d

Review URL: http://codereview.chromium.org/4998004
2010-11-15 14:11:49 -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
Kris Rambish
43c22803a1 Make removing the last ] more full-proof
Make removal of last ] more full-proof

Change-Id: I002e5ed513066a214fd6353f66e05bf5458f6ad4

BUG=7115
TEST= No file, with --subfolder
  No file, without --subfolder
  Empty file
  File with one config already in it, with --subfolder
  File with one config and garbage at the end, with --subfolder
  File with one config and newlines at the end, with --subfolder
  File with one config, without subfolder

Review URL: http://codereview.chromium.org/4688004
2010-11-15 11:26:22 -08:00
Scott Zawalski
f057702603 Merge branch 'master' of ssh://gitrw.chromium.org:9222/crosutils 2010-11-15 09:44:13 -08:00
David McMahon
37f4222632 Stop using CHROME_BUILD altogether - companion change coming in crostools.
BUG=
TEST=

Review URL: http://codereview.chromium.org/4917001
2010-11-12 16:17:59 -08:00
Don Garrett
132ff4320d cros_generate_upload_payload --patch_kernel should mount from the source
image read only to avoid unintended changes.

Change-Id: Id3a83786f2c1240a4401978c8cacffc0dcb9d66f

BUG=9073
TEST=Ran script with --patch_kernel, verified source image unmodified.
Ran ./image_to_live.sh to verify valid update was generated.

Review URL: http://codereview.chromium.org/4892002
2010-11-12 15:29:30 -08:00
Chris Sosa
5a886ff53d Don't allow hardlinks in tarball.
These errors on extraction if you don't have the original targets
of the links on the image (i.e. if the stateful_partition gets wiped).

Change-Id: Id5d3f770830de6165613d506733c04edefccd3fb

BUG=chromium-os:9103
TEST=Ran update, wiped partition, ran stateful_update and ran bvt's.

Review URL: http://codereview.chromium.org/4882006
2010-11-12 15:20:27 -08:00
David James
02b3e4f3d5 Revert "Add more error checking to preflight queue."
This reverts commit 795bd30f06.

BUG=
TEST=

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

Change-Id: I9148026ecd0df75c253cfcf0c67af3d26771dd21
2010-11-12 14:47:57 -08:00
David James
795bd30f06 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

Review URL: http://codereview.chromium.org/4442001
2010-11-12 14:33:14 -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
Chris Sosa
c60e567799 Convert rootfs and stateful mountpts to absolute paths.
Change-Id: Ib9b6b9ba7787fba337e71e4968a5c152b5a21e14

BUG=chromiumos:8885
TEST=Ran with default options and setting --rootfs_mountpt and stateful_mountpt
to dirs in my current workig directory ... saw cleanup correctly on unmount

Review URL: http://codereview.chromium.org/4853001
2010-11-12 10:54:25 -08:00
Hung-Te Lin
51484a96e9 crosutils: refine memento image / factory package creation
This CL improves creation of memento / factory image payload by:
 - verbose progress report
 - allowing to compress by pigz, the parallel version of gzip
 - prevents unpacking entire image if partition tools (cgpt/parted)
   is available.

BUG=chromium-os:6536,chromium-os:5208
TEST=Verified executing "time ./make_factory_package.sh ..." for ToT factory bundle:
 - before this CL (memento gzip param is not -9): 3m53.126s
 - after this CL, without pigz, with cgpt: 2m34.897s
 - after this CL, with pigz+cgpt, memento_gz=-9: 0m45.603s
 - after this CL, with pigz, without cgpt/parted, memento_gz=-9: 1m49.748s
 Also verified such bundle can be installed on a real netbook device.

Change-Id: Ie182844ea5482d6d321b9549fa584377edf7dfe3

Review URL: http://codereview.chromium.org/4824003
2010-11-13 02:43:14 +08:00
Raja Aluri
4ca4b147e5 Created branch 0.9.112.B. Update CHROMEOS_VERSION_BRANCH=113
Change-Id: Ia23fb80872a902750d113a6bbe65595ffbd6d720
2010-11-11 18:26:41 -08:00