Commit Graph

52 Commits

Author SHA1 Message Date
Chris Sosa
753977c09b Move some dev scripts into dev/host.
Change-Id: I8233aaab234eb6a3a7948abb1d311c4c9c162190

BUG=chromium-os:11172
TEST=Ran from new symlinks from previous locations.

Review URL: http://codereview.chromium.org/6731005
2011-03-23 14:34:53 -07:00
Chris Sosa
d39057d242 Wait until we can initiate contact with the update engine before starting update.
Change-Id: I2f741d7866192300946299f9050717721c2a644d

BUG=chromium-os:12605
TEST=Changed impl of check_status to return 1 and made sure timeout got inc'd
correctly and aborted.  Also checked to make sure if status returned 0 i.e.
update_engine_client --status returned 0, we would continue.

Review URL: http://codereview.chromium.org/6594089
2011-03-01 15:16:16 -08:00
Zdenek Behan
99f7a5397d scripts: call devserver/payload generators from chroot & delete moved scripts
BUG=chromium-os:5246

TEST=below, During all tests, the directory platform/dev was manually removed
1) Ran cros_au_test_harness.py and saw it succeed
2) Ran generate_au_zip.py, compared the generated .zip with one before this
patch - they were identical
3) Ran cros_image_to_target.py and saw it succeed

Change-Id: Iab2620245a45442b79ee8369f3af1a3990f4644e

Review URL: http://codereview.chromium.org/6576023
2011-03-01 22:57:33 +01: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
9a776566e9 image_to_live.sh: fix ip address detection
Change-Id: I6d05da5d1deaf45c42a3285c105fd310a588ef4e

BUG=5246
TEST=update an image, live

Review URL: http://codereview.chromium.org/6531005
2011-02-18 00:51:21 +01: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
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
Chris Sosa
efbce1e261 Add simple update test to pfq.
This CL also fixes the outstanding issue where to won't report progress in
image_to_live on updates.

Change-Id: I1efaf17f0fd5ebb367ae0872377b4d5d0bf5dbf6

BUG=chromium-os:8680,chromium-os:8901
TEST=Ran it with --debug on the x86 pfq locally.

Review URL: http://codereview.chromium.org/6135002
2011-01-10 09:56:34 -08:00
Don Garrett
c6c925d8ef image_to_live verifies root_dev changed.
Without this, image_to_live can sometimes think that an update from the same version to same version worked when it failed.

BUG=chromium-os:9002
TEST=By hand (hardware && success only)

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

Change-Id: Ic0835372a45a45785e21ba1527d478f447bcf42a
2010-12-21 13:41:57 -08:00
Doug Anderson
7361be58e0 Fixed image_to_live so that it will work with the new sudo
This change will not work properly unless the chroot sudo is
updated to handle escaping properly:
  http://codereview.chromium.org/5923001

...and the chroot sudo will break image_to_live unless this
change goes in.  Thus, the two changes are intertwined.

Change-Id: Ib1602ee47178fc5d32c286e9a914111c1140252b

BUG=chromium-os:7072
TEST=Valided that the dev server seemed to be getting proper args.

Review URL: http://codereview.chromium.org/5929001
2010-12-15 16:05:56 -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
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
Mandeep Singh Baines
a63cd2d648 Create a new command update_kernel.sh
This command can be used to update the kernel of a ChromiumOS target.

Much thanks to snanda for the inspiration and instructions.

BUG=9864
TEST=Verified that it works.

Change-Id: I66f7d940e0dc59b0e1a50409a7155fe0ba7157fe

Review URL: http://codereview.chromium.org/5550001
2010-12-02 11:58:26 -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
Ken Mixter
47fd7b5c51 crosutils: Always pass an image to devserver so it can pregenerate
Change-Id: Ib366064df269bd0d4aee30e5b1628938bd8fedf9

BUG=8313
TEST=Running it once without passing an image

Review URL: http://codereview.chromium.org/4208003
2010-11-08 13:35:05 -08:00
Chris Sosa
5494da3107 Pass board to devserver for latest image.
Change-Id: I339e1ce3d8f73e15aa554e1111aced163819ec23

BUG=8732
TEST=Ran with other CL and using latest image.

Review URL: http://codereview.chromium.org/4527001
2010-11-04 17:33:46 -07:00
Chris Sosa
113739c109 Add components to pass vm flag to dev server.
BUG=8306
TEST=Ran au_test_harness with CL for adding vm option for the devserver on the last channel release and my TOT.  All tests passed.

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

Change-Id: Ia2ce305dff2911dc4008d5f6e383535e4bbd4ab0
2010-10-28 23:46:20 -07:00
Chris Sosa
b38c7e637e Use pregenerate_update flag for devserver.
Change-Id: I4a6fc66db7b336ae07bdfa837dd5e0d806880e52

BUG=8255
TEST=Ran it with devserver with option.

Review URL: http://codereview.chromium.org/4169006
2010-10-27 16:05:43 -07:00
Chris Sosa
8e3e834e4a Add delta update support to imaging tools.
Change-Id: I3ad6d418a1d47f47b78ba4e011c83bc569041475

BUG=6912
TEST=Ran with http://codereview.chromium.org/4129005/show with and without src_image

Review URL: http://codereview.chromium.org/4147002
2010-10-26 21:40:25 -07:00
Chris Sosa
3b39a54ea3 Print last 200 lines of update_engine.log from failed update.
Change-Id: I0dbc760007038086b94d534d497a7f72b957f365

BUG=
TEST=Ran it on a failed update.

Review URL: http://codereview.chromium.org/4137003
2010-10-26 14:04:46 -07:00
Chris Sosa
ccfa2ac970 Change hostname to ip address if we can get it from ifconfig.
Change-Id: I6719ffe0c3c9356cf48b391b0a257e268eec94dc

BUG=7780
TEST=Ran it with cros_run_vm_test.

Review URL: http://codereview.chromium.org/3829002
2010-10-15 10:43:23 -07:00
Chris Sosa
4bec3be90b Gets image_to_live to work with a custom devserver_port
BUG=
TEST=Ran image_to_live using port 9090

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

Change-Id: I2a7086ec46f4e1f221ca4dd22f636d53708a88a1
2010-10-11 19:50:10 -07: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
Ken Mixter
5f53e5e732 crosutils: Fix verify bug with image_to_live without args
Change-Id: I0bcc3dbbf72fbae4bfa11340831d60d28202bb88

BUG=
TEST=Ran with just --remote=... to pick up latest image and it verified.

Review URL: http://codereview.chromium.org/3609003
2010-10-07 13:19:19 -07:00
Chris Sosa
3b65e8dd6f Add verify option to image_to_live.
Change-Id: I63f7ce38179b713bb26bed70d6fd392425595a81

BUG=
TEST=Ran with update vm script.

Review URL: http://codereview.chromium.org/3393019
2010-09-28 18:41:56 -07: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
Chris Sosa
c5a2038009 Add ability for image_to_live to control most of dev_servers abilities.
Before this change, image_to_live could only be used by either passing a custom URL
or using the latest built image.  I've added the following:

- Ability to update from an image.zip
- Ability to update from a specific image.
- Ability to clobber the stateful partition after an update
  (excluding /usr/local and /var)
- Ability to customize and capture both the update and devserver logs.
- Ability to see the progress of an update.

I've also modified the start logic.  It seems the update_engine can get in a state
where if you fail a previous update by killing the devserver, the update engine
will hang for a long time (retries a lot).  So I've changed the behavior of
startup and detecting that the system isn't ready to update, to be, reboot and
then try the update.

BUG=
TEST=Tested with all options.

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

Change-Id: I9bb42edbf5338385f55db242665c94cd552ab277
2010-09-17 10:55:39 -07:00
Dale Curtis
d0a2e12511 image_to_live was not providing a URL to the stateful_update script executed on the remote machine. Without the URL, stateful_update would default to reading /mnt/stateful_partition/etc/lsb-release for the URL, which is not setup by the script.
I've modified image_to_live to convert the dev server url into the proper form to access the stateful.image.gz and pass it along to stateful_update on the remote system.

Change-Id: I77971c83b7efef5f053fda7fcd2585ca73f3134a

BUG=6705
TEST=Imaged several machines using Dev Server.

Review URL: http://codereview.chromium.org/3417001
2010-09-14 13:03:11 -07:00
Chris Sosa
7778a30165 Move image_to_live to use update_engine.
Change-Id: Iddc1a4c1fe83877eff020f3e075ddba5e5594a57

BUG=
TEST=Tested with new dev server changes.  Ran through a successful update.

Review URL: http://codereview.chromium.org/3358004
2010-09-02 11:06:41 -07:00
Ken Mixter
cc4f1dd14e Script to generate post mortem of all crashes on device
BUG=4887

TEST=tested run_remote_tests and image_to_live still work.  Ran script with machine with no crashes, as well as on a machine with a slew of powerd CHECK(false)'s.

Change-Id: Iffb6571d30d99d876f41972f92a7149a716035ee

Review URL: http://codereview.chromium.org/3276002
2010-08-31 12:07:11 -07:00
Kelly Lucas
3c784f78fe Only kill the dev server when it is started by image_to_live process.
Review URL: http://codereview.chromium.org/1986012
2010-05-17 13:57:30 -07:00
Eric Li
9adee78b5c Add an update_url parameter to image_to_live.
So it could update netbook from a dev server hosted on another server.

Review URL: http://codereview.chromium.org/2012011
2010-05-12 11:53:39 -07:00
Eric Li
8a970bcd00 Enhance image_to_live script to really wait till dev server is up and running.
Review URL: http://codereview.chromium.org/2050001
2010-05-07 10:28:50 -07:00
Eric Li
18e38c33e6 Enforce image update from image_to_live.
The issue here is if an previous update succeeded but reboot not happen, for what ever unknown reason, this host lost the ability to update again.

I think some of the current update failure in the lab should be caused by this.

Review URL: http://codereview.chromium.org/2031002
2010-05-06 16:47:39 -07:00
Sean O'Connor
a5351aa563 Adjust image_to_live's devserver flags to work around lab network port restrictions.
Review URL: http://codereview.chromium.org/1967002
2010-05-04 18:43:32 -07:00
Chris Sosa
c1214dc327 Rename update script and update some documentation.
Review URL: http://codereview.chromium.org/1912005
2010-05-04 16:17:49 -07:00
Chris Sosa
5c37ce2e03 Modifies dev server to produce stateful gzip and modify image_to_live to use it.
TEST=Tested with image_to_live, memento_updater without image_to_live

This mimics the update process of the real image for the stateful partition.
By moving this the update into a separate script, I can add it to the gmerge
package such that developers will not have to use image_to_live.  This change
also removes the dependency on tar.

Review URL: http://codereview.chromium.org/1774021
2010-05-03 20:18:02 -07:00
Chris Sosa
257117d2cc Cleans up image_to_live changes and handles errors more gracefully
TEST=Tested by running image_to_live with correct formated images as well
as images that are missing either /var or dev_image directories.

Review URL: http://codereview.chromium.org/1705023
2010-04-30 12:41:59 -07:00
Chris Sosa
48768d8763 TBR: Missed last commit for image_to_live in last push 2010-04-27 15:48:09 -07:00
Chris Sosa
ef96430135 Changes to image_to_live to copy stateful partition over
Review URL: http://codereview.chromium.org/1784006
2010-04-27 13:21:08 -07:00
Mike Truty
c5f1d31034 Add ssh cleanup to avoid leaving running agents around when imaging problems.
Review URL: http://codereview.chromium.org/1609025
2010-04-14 16:11:22 -07:00
Eric Li
ac2de13847 Refine image_to_live script to log all output from devserver.
Review URL: http://codereview.chromium.org/1572034
2010-04-13 13:19:08 -07:00
Darin Petkov
7c2cef2e70 Rename image_to_live and fix it so that it works with the new start_devserver.
Review URL: http://codereview.chromium.org/1083007
2010-03-19 16:45:00 -07:00
Eric Li
83b50104dd 1. the dev server running with python 2.6 now, not python.
2. I dont fully understand why we need sudo inside this script. So I am removing it. Since I could not enter sudo password inside crontab. Please let me know if I missed anything and I could revert.

Review URL: http://codereview.chromium.org/666002
2010-03-05 11:18:17 -08:00
Ken Mixter
c0921383c0 Improvements for to continuous test loop.
Run a basic check on a buildbot grabbed image to make sure it has a
kernel installed in it.

Better failure recovery.

Review URL: http://codereview.chromium.org/553063
2010-01-25 11:02:32 -08:00
Ken Mixter
57d2a6bd12 Add functionality required for perf dashboard.
image_to_live.sh - fix problem where errorvalue is non-zero even when
  reimage was successful.
run_remote_tests.sh - add ability to stow build description in the
  autotest database so we can track the exact build for which
  tests succeed/fail.

Review URL: http://codereview.chromium.org/547018
2010-01-18 10:58:25 -08:00