Commit Graph

19 Commits

Author SHA1 Message Date
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
Don Garrett
86965c9baf Save off --remote flag
Change-Id: I5621ff8ab81408ac3f7daed970a065641495c4eb

BUG=chromium-os:10179
TEST=none

Review URL: http://codereview.chromium.org/5676002
2010-12-09 15:47:38 -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
Don Garrett
e55c89ab44 Create the latest_download dir if it doesn't exist.
I started to use /tmp, but it doesn't exist both inside and outside of the chroot. Using a consistent name like this has the advantage that the files will be cached and not redownloaded every time. Well, except on the build servers that wipe the related directories between builds.

Change-Id: I58b42d9f1bd18cc4eb44043ed2436d4ffa482767

BUG=chromium-os:10012
TEST=

Review URL: http://codereview.chromium.org/5597004
2010-12-06 15:59:14 -08:00
Don Garrett
969a673045 Add testPartialUpdate, testCorruptedUpdate.
Add two new tests that test update-engine handling of a corrupted image,
or a truncated image.

BUG=chromium-os:9502
TEST=Ran against Dell L13, Mario

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

Change-Id: Ie1043004f01131ea837798c06327c486e1901c15
2010-12-02 17:54:40 -08:00
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
a2a597d18b Add ability to fall back to fulls for all updates.
Currently works around issue till we get a good fix in for 9.x.

Change-Id: I9c7225508fa8f46a5fa5e0b41abc4e373cc80085

BUG=8606
TEST=Tested by sending SEGV to a delta update during update and saw it successfully fall back to a full update and succeed.

Review URL: http://codereview.chromium.org/4258002
2010-11-02 18:06:34 -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
42df54df1c Revert to fulls for boths tests if delta fails.
Change-Id: Iabc931f2eb1751ca9d05e92e64e5361755791648

BUG=
TEST=Copied and pasted from other try/except

Review URL: http://codereview.chromium.org/4109006
2010-10-28 14:39:11 -07:00
Chris Sosa
f8b650ac1a Re-try with full updates if first delta fails.
Change-Id: Ica7360dc4b2a62384874ba1b802039289747c6e3

BUG=
TEST=Ran it

Review URL: http://codereview.chromium.org/4137010
2010-10-28 04:12:23 -07:00
Chris Sosa
9b76b421e4 Use the right base path for vm updates.
Change-Id: I98276b26b85e48ae4b65e8f3fb65540b24665f9a

BUG=Will file
TEST=Ran it

Review URL: http://codereview.chromium.org/4185008
2010-10-28 03:41:14 -07:00
Chris Sosa
54f3b0bbd6 Add delta support to the update test harness.
Change-Id: I94159ac5468dd486123f7cb00da29526b5857d8f

BUG=8192
TEST=Tested with other CL's.

Review URL: http://codereview.chromium.org/4170004
2010-10-26 21:42:47 -07:00
Chris Sosa
f38f249eb4 Update config for cros_au_test_harness.
Change-Id: Iccc5d28f4520418c58089cdb53b6e644271b2eb3

BUG=
TEST=n/a

Review URL: http://codereview.chromium.org/4051003
2010-10-24 02:13:27 -07:00
Chris Sosa
aa4670315b Fix equals in RunCommand's in cbuildbot.
Change-Id: If8cdde42a470c3d07cfd41552cf95dea7567688b

BUG=
TEST=Ran cbuildbot.

Review URL: http://codereview.chromium.org/3967002
2010-10-21 10:54:02 -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
Chris Sosa
d8f50a931f Propagate return code correctly from tests.
Change-Id: I28c5f3e48646ec24813ef86f4cd16aac120cba5b

BUG=
TEST=Introduced artificial bug and checked return code
from test.

Review URL: http://codereview.chromium.org/3593010
2010-10-07 11:24:28 -07:00
Chris Sosa
24680f0059 Add ability to test machines with au test harness.
Change-Id: I913acd95c49b1cf0fd666b49fb5ec1e24f0f83d1

BUG=7285
TEST=Ran through test against with two test images.

Review URL: http://codereview.chromium.org/3619009
2010-10-06 16:56:56 -07:00
Chris Sosa
af33f8f8ae Add board option to au test harness so that this works for others without a default board and add ability to reference images without relative paths.
Change-Id: I4afa86fa7a6b772124de56114910a1ca5e3d4511

BUG=
TEST=Ran through update harness code and ran loman.

Review URL: http://codereview.chromium.org/3612004
2010-10-04 18:19:29 -07:00
Chris Sosa
bccc7c1d03 Initial auto update engine test harness.
This harness has support for test on vm machines.  It takes a base image and target image path, creates an update-enabled vm image from the base image and performs updates using cros_run_vm_update (vm wrapper around image_to_live).  It uses --snapshot for updating vm's and keeps them on (like a real machine would) so that the VM image is clean on the next test.

The current check in has two test cases -- updates without clobbering the stateful partition and updates with clobbering the stateful partition.

Change-Id: I5406eadb39fa36601d17f8dd15625bd6a8b38c15

BUG=6911
TEST=Ran through tests.

Review URL: http://codereview.chromium.org/3554002
2010-09-30 15:06:15 -07:00