Commit Graph

304 Commits

Author SHA1 Message Date
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
798f78f0ee Fix case where we don't pass in a test base.
This should fix the failure seen in internal builds

Change-Id: I527acc37597ab9157aedf0330e43f3159ee66fdd

BUG=Should exist
TEST=Ran it locally
TBR=dgarret.  Internal builds have been failing on these for a while and no one yelled about it :(

Review URL: http://codereview.chromium.org/6676059
2011-03-16 19:54:03 -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
574be57684 Avoid race condition on creating directory by pre-creating early.
Change-Id: I9fed7319609848ba90abfaa147fad85bd4114fdc

BUG=TreeCloser
TEST=Ran it locally in a VM a cpl times.

Review URL: http://codereview.chromium.org/6696002
2011-03-14 15:52:13 -07:00
Chris Sosa
9d30ce80fa Ignore git config errors that may occur in enter_chroot.
git config doesn't behave well if there are multiple callers
calling it at the same time.  Since this is best effort anyway,
I'm adding an || true so that multithreads calls to this don't
fail.

I removed my previous work around to this since it wasn't generic enough.

Change-Id: I12f2d3faaa745c1ff675a297bb09c567a88aa185

BUG=chromium-os:13070
TEST=Ran it a lot

Review URL: http://codereview.chromium.org/6693001
2011-03-14 15:00:46 -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 Masone
6530f1bec8 [crosutils] Remove --use_emerged from cros_run_parallel_vm_tests
cros_run_parallel_vm_tests doesn't work unless you pass --use_emerged; there must be some underlying issue with trying to perform multiple run_remote_tests commands at the same time, even on different VMs.  So, remove the option and force --use_emerged on the calls to cros_run_vm_test.

BUG=8544
TEST=run two tests in parallel with cros_run_parallel_vm_tests and see that they both complete.

Change-Id: I1152ca3dd7f1de37261da894b9b903c90c2e6524

Review URL: http://codereview.chromium.org/6612058
2011-03-09 17:09:06 -08:00
Chris Sosa
cc0c062a3d Remove accidental test/debug regression I added in refactoring.
Not sure how I missed this.

Change-Id: Icd67b6119cbe5ef59bcf2c42784ac8fd011f2ab9

BUG=chromium-os:12953
TEST=Ran it

Review URL: http://codereview.chromium.org/6659009
2011-03-09 14:58:17 -08:00
David James
7a05e06dc9 Fix breakage in ctest.py.
Spotted the following error on the bots:

Traceback (most recent call last):
  File "bin/ctest", line 318, in <module>
    main()
  File "bin/ctest", line 314, in main
    options.remote, not options.cache)
TypeError: RunAUTestHarness() takes exactly 9 arguments (8 given)

http://chromeos-botmaster.mtv.corp.google.com:8026/builders/x86%20AGZ%20Full/builds/545/steps/cbuild/logs/stdio ( http://bit.ly/fdwOq1 )

This change fixes the error introduced in b54301bb9a.

TEST=Verify that new argument is passed through.
BUG=chromium-os:12211

Change-Id: Ibe8ee2f1fd0001525a5699a9dc107730f9c181de

Review URL: http://codereview.chromium.org/6625035
2011-03-04 19:14:09 -08:00
Chris Sosa
b54301bb9a Add ability to pass a base test root and create results dirs relative.
Sets up dir paths as follows:

test_root/test_name i.e. SimpleUpdate/<num>_stage

For example:

test_root/testNormalUpdateKeepStateful/2_verify/...test_results...
corresponds to the second invocation of verify image.  The test
results for this stage are stored here.

This is a predecessor for storing arbitrary logs e.g. update into
this test results root.

Change-Id: I7183420b5dcb0d6971aa508a338c048c3557e359

BUG=chromium-os:12211
TEST=With simple a full vm test suite w/ w/out explicit test root
set.

Review URL: http://codereview.chromium.org/6614029
2011-03-04 15:06:01 -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
Chris Masone
2eae7c239d [crosutils] Add --quiet to cros_run_parallel_vm_tests
When running tests that generate huge amounts of output (like
desktopui_BrowserTest) it would be nice to suppress stdout and stderr
so that the buildbot logs aren't enormous.  Adding a --quiet flag that
requires the --results_dir_root flag ensures that we can trim the
output while still ensuring that the useful data is captured.

BUG=8544
TEST=run two tests in parallel with --quiet and --results_dir_root and see that the output is where you expect it

Change-Id: I25c7ad2bc1d017a30df0d1ad4604207443e711d7

Review URL: http://codereview.chromium.org/6602098
2011-03-02 16:37:23 -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
a400b3f5fa cros_image_to_target: use newstyle updates, followup after switching --nooldstyle to be the default
BUG=n0ne
TEST=run the script and see the update go

Change-Id: Ie767edf85876b7864f6425efed1ac554026ecdff

Review URL: http://codereview.chromium.org/6596062
2011-03-01 01:42:55 +01:00
Che-Liang Chiou
75ac2beb67 Add transitional flag for enabling arm kernel signing
For now arm kernel partitions are not signed. This CL is a transitionsl.
That is, the added flag should be removed after arm verified boot is stable.

To properly create an arm kernel partition, we also need another CL for
vbutil_kernel utility that turns off x86-only modifications on kernel
image. See CL:6538015.

BUG=chromium-os:3790,chromium-os:12352
TEST=see below

Build images for x86 and arm successfully, and notice that load_kernel_test
passes for x86 and signed arm image.

$ build_image --board=tegra2_seaboard --crosbug12352_arm_kernel_signing
$ build_image --board=tegra2_seaboard --nocrosbug12352_arm_kernel_signing
$ build_image --board=x86-generic

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

Change-Id: I1be381bae2fc367a0603ac2ec67ee70fc9a257e4
2011-02-24 12:00:16 +08:00
Chris Sosa
4de24322bd Revert "Add build flag for iterative vm testing."
This reverts commit 519a6560e4.

BUG=For AU harness failures.
TEST=TBR

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

Change-Id: I6001bf4c52951e4d9698985285538b162ae6b6f6
2011-02-23 14:22:39 -08:00
Will Drewry
b910de849c kernel build: use %U+1 for dm-verity booting
Using %U+1 will ensure that we avoid device enumeration issues during recovery mode
boots.

TEST=build_image+dev recovery kernel and boot to it on new cros fw / fixed enumeration problem
         used build with mp recovery kernel on cr-48 -> installed then booted fine
         used dev recovery kernel on a legacy machine; installed fine, booted fine
         tested with cr-48, mp recovery kernel, and noenable_rootfs_verification to ensure /dev/sd%D%P still worked as normal.

Change-Id: I5b1277a47536738a78c18988fd912cc05ebddd4b

BUG=chromium-os:5470

Review URL: http://codereview.chromium.org/6549034
2011-02-23 13:26:50 -06:00
Chris Sosa
519a6560e4 Add build flag for iterative vm testing.
Change-Id: Ib8258b33f87aeadfbaee145bdf7ab460af66c39f

BUG=N0ne
TEST=Ran it with --build

Review URL: http://codereview.chromium.org/6368129
2011-02-22 17:56:14 -08: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
Don Garrett
c5ae0344d2 ReinterpretPathForChroot for public key
Change-Id: Ifcd52aad929453e801d143f5e16c26566aac4405

BUG=None
TEST=Manual

Review URL: http://codereview.chromium.org/6532015
2011-02-16 21:27:32 -08:00
Don Garrett
2d08a983b2 I'm still breaking the build. Reverting again until I figure out why.
TBR

BUG=None
TEST=None

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

Change-Id: I21283ed2b1f81086ccc95b0436e66c53584f4583
2011-02-16 18:39:35 -08:00
Don Garrett
e47eee3bc8 The original --quiet change failed (and was reverted) because cros_au_test_harness.py wasn't updated when the argument was changed from --quiet to --hide_info.
So... revert the reversion, and fix cros_au_test_harness.

BUG=chromium-os:11680
TEST=Manual

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

Change-Id: I1bdf66a5735d4178ee1e2eaa838e7b4b7fb966d5
2011-02-16 15:49:14 -08:00
Don Garrett
8dcd981bbf Revert "Add --quiet to run_remote_tests, and use it"
This reverts commit 5b7e1d5da4.

Reverting to fix the build. TBR

BUG=None
TEST=None

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

Change-Id: Idc9e60f97dd545225538420402c71b611233ce1e
2011-02-15 21:01:40 -08:00
Don Garrett
5b7e1d5da4 Add --quiet to run_remote_tests, and use it
Change-Id: I91f490ba4c4a834ba01b671c56c63ba230561ada

BUG=chromium-os:11680
TEST=Manual

Review URL: http://codereview.chromium.org/6529010
2011-02-15 17:40:56 -08:00
Chris Sosa
69cdce233e Fix tree closer. Deal with none case for PFQ.
Change-Id: Ia7883c196c688236051a4637561c9a01be5358cb

BUG=TreeCloser
TEST=Ran with simple prefix for x86-generic and no keys

Review URL: http://codereview.chromium.org/6480085
2011-02-15 12:51:06 -08:00
Chris Sosa
8dad50d97f Update test harness to take in optional public and private keys to sign payloads.
In addition some refactoring to make this cleaner and easier.

Change-Id: I1607700d065c71aff2b2833b10acbd3ebace68ce

BUG=chromium-os:8212
TEST=Ran with Simple ... running now with full

Review URL: http://codereview.chromium.org/6482017
2011-02-14 15:29:32 -08:00
Don Garrett
6620630c34 Switch ctest to array/appends for cros_au_test_harness call.
I was getting the error about passing along an empty string argument, and this will fix that.

Change-Id: Iffd05fe570f3a6092bbeee05abf8a1884decd644

BUG=N0ne
TEST=remote testing in progress (no VM testing)

Review URL: http://codereview.chromium.org/6465014
2011-02-09 13:51:43 -08: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
Mandeep Singh Baines
93da99be03 cros_workon: fix comments/messages to be consistent with new location
cros_workon has move to /usr/bin/

BUG=11507
TEST=none

Change-Id: I7301f659900713c432104ccceb3e658218e0ecac

Review URL: http://codereview.chromium.org/6334137
2011-02-05 11:42:19 -08:00
Anton Staaf
fd135cd9d0 Move cros_overlay_list to src/platform/dev.
This is step 3/3, after cros_overlay_list is added to dev, and
after the ebuilds are updated to install from dev and not
crosutils, then this can go in.

Change-Id: I8ae26938fb14ccf6737acd9ca99b58aaf65a1aca

BUG=chromium-os:11507
TEST=None

Review URL: http://codereview.chromium.org/6392034
2011-02-02 15:49:23 -08:00
Chris Sosa
79088f496e Remove buildbot code that has been added to chromite.
Change-Id: I7eb27ac81704de8689a65203a440303a52a01dc2

BUG=chromium-os:11171
TEST=we'll see if things explode

Review URL: http://codereview.chromium.org/6286040
2011-02-02 15:39:58 -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
Chris Sosa
558940dddb Make git config optional to allow multiple calls to enter_chroot at the same time.
It's very rarely needed anyway but enter_chroot does everything under the sun.

Avoids:

error: could not lock config file ~/.gitconfig

Change-Id: Ide72b14fd434b182a88d2fc636559b3515905509

BUG=chromium-os:11523
TEST=Ran it ... 10x

Review URL: http://codereview.chromium.org/6312069
2011-02-01 13:07:55 -08:00
Chris Sosa
19ef17732c Do not pregenerate update payloads in parallel.
TBR dgarret

Change-Id: I71ef4b02108f43717e4bc404290952df99112654

BUG=n0ne
TEST=NA

Review URL: http://codereview.chromium.org/6349021
2011-02-01 09:57:29 -08:00
Chris Sosa
39ed0d0ebe Clear cache for runs of ctest if --cache not set.
Change-Id: I013c838c83dd23cbfe04f77f87df74778d8e874e

BUG=chromium-os:10723
TEST=Ran it

Review URL: http://codereview.chromium.org/6389004
2011-01-31 12:12:41 -08:00
Chris Sosa
b8a84b2cb7 Change uprev to False for Chrome pfq.
Change-Id: I8c635cf228c9bf1c77d97656d6b38de5289ff9e6

BUG=
TEST=

Review URL: http://codereview.chromium.org/6347027
2011-01-28 22:48:46 -08:00
Chris Sosa
25272888e8 add cwd
TBR dgarret

Change-Id: I8d7f86d716f1da76f4c85259f401c3ccc9a031ff

BUG=
TEST=

Review URL: http://codereview.chromium.org/6392010
2011-01-28 20:53:08 -08:00
Chris Sosa
d7beed79b6 Rebuild chroot for full builders.
TBR dgarrett

Change-Id: Ibed5341626d498adeeb259cac54ebb05ca1b4421

BUG=
TEST=

Review URL: http://codereview.chromium.org/6407001
2011-01-28 18:43:46 -08:00
Chris Sosa
b62c4860f8 Fix issue where full builders end prematurely.
TBR dgarrett

Change-Id: I08b7c19b8010003857f9791ca45ec9cadb972d47

BUG=N0ne
TEST=Ran

Review URL: http://codereview.chromium.org/6352027
2011-01-28 18:30:02 -08:00
Don Garrett
7b8075ac6d Added arm-tegra2-seaboard-full, should have added in previous change.
Change-Id: Iecb40121b4bc8ee652fe72c4a8c07e3d231293bf

BUG=chromium-os:11229
TEST=Passed unittests (shows correct syntax)

Review URL: http://codereview.chromium.org/6379015
2011-01-28 14:52:17 -08:00
Chris Sosa
436209ec5b Have the ability for the PFQ to both rev Chrome and other packages.
This issue seems bigger than it first appears because we had put extra logic to "Delete" the branch if we didn't rev anything.  This CL basically takes out all the Deletes and relies and cros_mark_as_stable clean to clean up any old dirs correctly.  To do this, I had to fix a bug in clean so that we actually delete the stable branch as part of it (if it exists).

EOM

Change-Id: Ic1020451dc1d492d4b6e2a233d1d49cf8c1c16b3

BUG=chromium-os:11329
TEST=Ran x86-generic-pfq w/ dev options + --chrome_rev=latest_release ...built chrome,
and revved packages without error.  Doing more testing still.

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

Review URL: http://codereview.chromium.org/6291013
2011-01-28 14:27:38 -08:00
Don Garrett
e7b9a4f558 Add new configs to cbuildbot_conf to match master.cfg
Change-Id: I4a28ac0f8e1a90313a9373e213e8a30003d1f8ad

BUG=chromium-os:11229
TEST=Unittests

Review URL: http://codereview.chromium.org/6268020
2011-01-28 14:14:26 -08:00
Vincent Palatin
3eb3543e9a Revert "Have the ability for the PFQ to both rev Chrome and ..."
This reverts the commit a8ac0ec8c3.

TBR the x86 PFQ buildbot fails

BUG=chromium-os:11447
TEST=
TBR=sosa

Change-Id: I019de669db13b753365e1208acc9923c4bb5c993

Review URL: http://codereview.chromium.org/6339018
2011-01-28 15:55:47 -05:00
Chris Sosa
a8ac0ec8c3 Have the ability for the PFQ to both rev Chrome and other packages.
This issue seems bigger than it first appears because we had put extra logic to "Delete" the branch if we didn't rev anything.  This CL basically takes out all the Deletes and relies and cros_mark_as_stable clean to clean up any old dirs correctly.  To do this, I had to fix a bug in clean so that we actually delete the stable branch as part of it (if it exists).

EOM

Change-Id: Ic1020451dc1d492d4b6e2a233d1d49cf8c1c16b3

BUG=chromium-os:11329
TEST=Ran x86-generic-pfq w/ dev options + --chrome_rev=latest_release ...built chrome,
and revved packages without error.  Doing more testing still.

Review URL: http://codereview.chromium.org/6291013
2011-01-28 11:17:57 -08:00
Don Garrett
38a66574b6 Add more cbuild options, revise configs
BUG=chromium-os:11229
TEST=Local, unittests

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

Change-Id: I103d693a2e6ce033c1f495f9f48450156ad72e94
2011-01-27 14:04:15 -08:00
Chris Sosa
6e79ebeaa1 Actually die if a parallel test fails.
Change-Id: I24b498fffb7e7ce54517945730c91fecd1d57586

BUG=chromium-os:10723
TEST=Ran it and killed a test

Review URL: http://codereview.chromium.org/6260023
2011-01-27 11:18:25 -08:00
Anton Staaf
95e56d1ca2 Update cros_overlay_list to work from either src/scripts or /usr/bin.
Change-Id: If4c2852568454c2dccf09b0fc1e180ed228a1bb7

BUG=chromium-os:4230
TEST=run cros_overlay_list from both locations in the chroot and src/scripts outside the chroot.

Review URL: http://codereview.chromium.org/6293021
2011-01-27 09:38:46 -08:00
Chris Sosa
d6ca361c09 Add Chrome PFQ config that is a copy of current pfq.
Change-Id: Ie1ee6554ec0973a85a11c264346295fd27f59ebf

BUG=chromium-os:11329
TEST=Ran with cbuildbot on local system.

Review URL: http://codereview.chromium.org/6384017
2011-01-26 22:01:33 -08:00
Chris Sosa
fb58ea5d96 This change squashes output while pregenerationg updates.
It also caches sudo credentials before running jobs (for devs) and
exits if any updater returns an error code != 0 with the output
of pregenerate update

BUG=chromium-os:10723
TEST=Ran it ... killed one pregeneration to make sure it did print + exit
correctly

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

Change-Id: I04842211e469b3a0022cb53b78efd17fbebe7010
2011-01-26 18:44:59 -08:00
Don Garrett
91c39378e0 Add buildbot functionality to cbuildbot.
Change-Id: I1291d2f52122fe345c5927a7ef27e20d07e917d7

BUG=chromium-os:11229
TEST=(building locally, still in progress)

Review URL: http://codereview.chromium.org/6317014
2011-01-26 11:53:26 -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
0f411ec7d9 Fix sudo again.
TBR:dgarrett

Change-Id: Idf2c15b873c4ee6c7865978d62f0b134c149b66f

BUG=chromium-os:10723
TEST=NA

Review URL: http://codereview.chromium.org/6384012
2011-01-25 17:59:46 -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
b6d82e8bb7 Pre-generate updates with root user.
image_to_live runs dev_server with sudo so old cached entries are
owned by root rather than $USER.  Change to pre-generate also with
sudo.

Change-Id: I587f15953b37d4de439977e7dbac9fced175c173

BUG=chromium-os:10723
TEST=Ran it

Review URL: http://codereview.chromium.org/6380008
2011-01-20 13:00:08 -08:00
Chris Sosa
a4cc3cd3ab Pre-generate updates for test harness in parallel.
First CL of many.  Thought I'd commit this before the others since
it sets stuff up for the other CL's (i.e. Thread Pool).

With this CL, all updates will be pre-generated before the test run.
This should improve some speeds since the two updates will be produced
at the same time rather than at the time of the sequential tests.

Change-Id: Iaf0a06f0d99c31d3d749e478fd2fb6efa0763a28

BUG=chromium-os:10723
TEST=Ran it with -q

Review URL: http://codereview.chromium.org/6264005
2011-01-20 10:23:54 -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
Chris Sosa
f867de71d0 Disable tests that don't work with verbose and set verbose as default.
Change-Id: I25066c75797ec7ce481ee096a2dc777d48634581

BUG=Get tree 0pen
TEST=Ran it

Review URL: http://codereview.chromium.org/6279002
2011-01-14 10:38:26 -08:00
Chris Sosa
4db7ac8f98 Print out SVN revision number for TOT chrome pfq builds.
Change-Id: I046d49c7002586671dc7c6707afeeeb0a0360cd5

BUG=10934
TEST=Ran it with bin/cros_mark_chrome_as_stable tot. Verified output and that it still did the right thing

Review URL: http://codereview.chromium.org/6327002
2011-01-13 14:11:18 -08:00
Chris Sosa
8617623516 Major cleanup of cros_au_test_harness code.
This cleanup code consolidates parsing of options, removes
globals, cleans up private vs. public functions, removes the backup full update option, and cleans up
docstrings.

Change-Id: I3eba26b3634fd87f4a36f195ab42ec7bd11e963f

BUG=chromium-os:8901
TEST=Ran with prefix SimpleTest and ran whole suite for a vm using my latest built image.  Also ran normal update test using latest image against latest dev channel image for mario.  Re-tested with new changes after build break.

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

Review URL: http://codereview.chromium.org/6015013
2011-01-10 13:37:49 -08:00
Chris Sosa
f58bc389d9 Create package keywords directory if it doesn't exist.
Clobbering the builder uncovered a bug that was lurking.

Change-Id: Ieb487d2112a7048438943aa96fba23e9c8412a13

BUG=chromium-os:8693
TEST=Running now

Review URL: http://codereview.chromium.org/6050004
2011-01-10 10:58:58 -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
J. Richard Barnette
e7205e84be Revert "Major cleanup of cros_au_test_harness code."
This reverts commit 2b2d7a1426.

The internal x86 buildbots have been reporting failures from
cros_au_test_harness with every build, starting with the build
that included the change being reverted.

BUG=chromium-os:8901
TEST=None

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

Change-Id: Iac8c0a13d659f927b3ff61a9a894c10191432e2d
2011-01-05 18:38:49 -08:00
Chris Sosa
2b2d7a1426 Major cleanup of cros_au_test_harness code.
This cleanup code consolidates parsing of options, removes
globals, cleans up private vs. public functions, removes the backup full update option, and cleans up
docstrings.

Change-Id: I3eba26b3634fd87f4a36f195ab42ec7bd11e963f

BUG=chromium-os:8901
TEST=Ran with prefix SimpleTest and ran whole suite for a vm using my latest built image.  Also ran normal update test using latest image against latest dev channel image for mario

Review URL: http://codereview.chromium.org/6015013
2011-01-04 18:05:59 -08:00
Chris Sosa
50744ba57c Remove try/catch so that ctest blocks builds.
All blocking reasons for au test harness flakiness have been resolved.  Removing try/catch from ctest so that we propagate the correct error code upon exit.

Change-Id: Iee1f09ade37ac7a590c2dbf4ebb96985818f1882

BUG=chromium-os:10434
TEST=Ran ctest unittests.

Review URL: http://codereview.chromium.org/5971009
2011-01-04 12:17:17 -08:00
Chris Sosa
70311cdfdd Change logic to auto-rev for latest_release and sticky branch.
Also some cleanup and fixing so we don't create unnecessary ebuilds.
I noticed that both the latest release and stable release code
were trying to rev the same branch whenever we moved to a new stable
version.  It was harmless before but now that we're pushing this as
stable we want exactly to have the minimum number of revs that are
correct

Change-Id: I9f834d35be8e85c27ab0505ec81637f9a3c27b88

BUG=
TEST=Unittests and mocked in my own directory by creating new stable
branch.

Review URL: http://codereview.chromium.org/6025012
2010-12-29 15:23:15 -08:00
Chris Sosa
b1d17e24eb Move git config till after we sync.
This deals with the condition where on a clobber we don't actually
re-config to use ssh:// until the second run (because git config is
called before we first sync the code).

Change-Id: Icf1a46aced633b570db9d280b10ae6866af04709

BUG=chromium-os:10545
TEST=Unit tests

Review URL: http://codereview.chromium.org/6027006
2010-12-22 14:10:10 -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
6b69ba7121 Always run build_packages regardless of sync for chrome builder.
Change-Id: If08f3a0c1212e3e7d4ae8dc9f8aa92e2454d4d74

BUG=chromium-os:8693
TEST=Ran it

Review URL: http://codereview.chromium.org/6016005
2010-12-20 11:40:29 -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
Chris Sosa
d523d23f2e Remove explicit call to build Chrome.
Since the package.keywords change, it's already built as part of build_packages.
With this change we don't have to needlessly build chrome twice as part of the
pfq.

Change-Id: I8dae745496a5d6f6213663b034ffe8d279d4efd3

BUG=chromium-os:8693
TEST=Ran unittests

Review URL: http://codereview.chromium.org/5973003
2010-12-17 12:35:34 -08:00
Chris Sosa
78bc7d7415 Fix regression introduced by proxy port.
Change-Id: I42a6110d41e79bb0ad50817e2e76b06f7973f6c2

BUG=chromium-os:10434
TEST=Ran it with --test_prefix for delay payload test and it succeeded.

Review URL: http://codereview.chromium.org/5877007
2010-12-16 19:37:28 -08:00
Scott Zawalski
4228f22c97 Change tegra2 binary builder to use board=tegra2_dev-board instead of tegra2.
This aligns the binary builder with the full builder.

BUG=NA
TEST=NA

Review URL: http://codereview.chromium.org/5839004
2010-12-16 13:44:32 -08:00
Chris Sosa
f19dea58e9 Fix discovering of stable candidate with unstable ebuilds.
Also add some more information output when we detect that there
is nothing to do.

Change-Id: Ia3dcf0d3c276e10d3368d6bd508f3a0d72be79cd

BUG=chromium-os:8693
TEST=Ran it with all 3 paramaters and current overlay.

Review URL: http://codereview.chromium.org/5884004
2010-12-16 12:36:45 -08:00
Chris Sosa
7c3fdc13b0 Push prebuilts by default.
Change-Id: I0d03b037253f299e36c3621ff6e5970e9af2bb11

BUG=chromium-os:10375
TEST=NA

Review URL: http://codereview.chromium.org/5876002
2010-12-15 17:42:44 -08:00
Chris Sosa
d75d3b43c8 Undo all the manifest logic from cbuildbot.
We also print to /dev/stderr directly to avoid flushing issues which have been occassionally given us broken manifests printed out

Change-Id: I97819bbc31142432aa5ef926f99f2c4f90fd50ef

BUG=chromium-os:9714
TEST=Ran cbuildbot through sync

Review URL: http://codereview.chromium.org/5888003
2010-12-15 17:42:07 -08:00
Doug Anderson
9b0127c6f5 Fixed build failure w/ new sudo
Change-Id: I2760e33e1473ce04f7adeda39d0db5725eaa81ae

BUG=chromium-os:7072
TEST=Replaced ./build_packages with bash and ran command; valided env var set right.

Review URL: http://codereview.chromium.org/5930002
2010-12-15 16:51:49 -08:00
Chris Sosa
cd2196d6c5 Add package.keywords logic to build version of chrome we specify.
Change-Id: I32c17e7353b420d7a895acffab4579c9b861095c

BUG=chromium-os:8693
TEST=Ran it with chrome_rev=tot, latest_release and stable_release

Review URL: http://codereview.chromium.org/5854001
2010-12-14 17:57:02 -08:00
David McMahon
48db5d2068 Moving chromeos_version.sh to chromiumos_overlay.
BUG=chromium-os:9714
TEST=

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

Change-Id: Ib569fe59f4e14551b198568b24014208b5d65647
2010-12-14 16:19:24 -08:00
Don Garrett
fdefe8664b Fix cros_run_vm_update --proxy_port support
BUG=chromium-os:10318
TEST=Manual

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

Change-Id: I26f0cad29e2b36b045883f0e153e8994e6b436cd
2010-12-14 11:09:19 -08:00
Chris Sosa
97432e7e9e Don't push manifests for chrome pfq.
Change-Id: I252616725936b2c471026d39d06c3fbb2fa1ed65

BUG=chromium-os:8693
TEST=Ran with chrome_rev=tot

Review URL: http://codereview.chromium.org/5744003
2010-12-13 16:20:51 -08:00
Chris Sosa
d8a0a57c30 Add support to pushing unstable changes for the chrome pfq.
This specifically gets the pfq one step closer to being completely ready to rev.  We add --noprebuilts for the chrome pfq as its not ready to host prebuilts and instead we push unstable ebuilds.  Anush noticed an Anush today where we are revving even when we don't change, and I've addressed this also in this CL.

Specifically:

1)  Sort in cbuildbot long options by long format
2)  Add --noprebuilts so that the Chrome PFQ can use this for now.
3)  Fixed a unittest that had broken in a previous CL for cros_mark_chrome_as_stable.
4)  Add ability for chrome to only rev if something really has changed:

 -- This means, if the new ebuild either:
  -- doesn't have the exact same chrome_version
  -- or diff -Bu (actual diff) between last ebuild and new ebuild isn't the same (i.e. detecting a 9999 change or different CROS_SVN_COMMIT)

Change-Id: I9b289c2168d6868299573f5d7c7a676380ee497e

BUG=chromium-os:8693
TEST=Ran unittests (cbuildbot, cros_mark_*) and ran cbuildbot with new chrome pfq items.

Review URL: http://codereview.chromium.org/5783001
2010-12-13 11:27:26 -08:00
Chris Sosa
c663f209f7 Add ability to store the manifest in the manifest directory.
Change-Id: I1ac3ed12df00424ba5ba2d1c61fd6fe9716e13b9

BUG=chromium-os:9714
TEST=Ran new unittests as well as ran cbuildbot on local b/cbuild

Review URL: http://codereview.chromium.org/5689003
2010-12-13 11:11:35 -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
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
David James
ab5c6917c6 Update cbuildbot.py to use emptytree option instead of deleting board.
This allows us to avoid deleting the board and still ensure our packages are
in sync with the full buildbot. This allows us to detect conflicts between
old and new packages.

BUG=chromium-os:10127
TEST=Run cbuildbot.py with emptytree feature forced to on and verify that
     build_packages rebuilds all packages. Also run unit tests.

Change-Id: I83e186937e28eef44285724697895a4583910b58

Review URL: http://codereview.chromium.org/5652007
2010-12-09 14:52:46 -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
Chris Sosa
b5ed3128ee Change config to use stable vs. sticky.
Change-Id: I0dda2cfb6e11cb69a6a1a6a4bae478cab78b8947

BUG=chromium-os:8693
TEST=Ran it with cros_mark_chrome with stable_release
TBR=Config change to get chrome builder up.
2010-12-07 17:40:34 -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
Anush Elangovan
dcd5b59d4a Disable chrome version check in vm_test since it is in a ebuild
Change-Id: I1a3f46cf37341255dbb01866cf68e5308bb36d83

BUG=10024
TEST=adhoc

Review URL: http://codereview.chromium.org/5603007
2010-12-04 17:21:38 -08:00
Chris Sosa
1a4a9665d4 Have upload_prebuilts respect the debug flag.
Chrome PFQ right now is uploading prebuilts which wasn't meant to happen :(

Change-Id: I502a0621a6c9f655e5a3f890dd79e00652925902

BUG=chromium-os:8693
TEST=Ran cbuildbot with --debug

Review URL: http://codereview.chromium.org/5595004
2010-12-03 16:28:33 -08:00
Mandeep Singh Baines
46b5e1d286 cros_workon_make: actually inplace when doing an install
Also, fixed to honour external FEATURES for the install case.

BUG=n0ne
TEST=Built a kernel with this CL.

Change-Id: I17d50cc382b297766761f12d47a555630fedc016

Review URL: http://codereview.chromium.org/5530004
2010-12-03 16:18:30 -08:00
Chris Sosa
4f09b96e70 Use release candidates as a backup in case we fail to find the latest release.
Change-Id: Ia94f1c983aec533fc2813f9c300266d394b8ee7c

BUG=chromium-os:9946
TEST=Ran ctest and saw through the download and start of the test harness

Review URL: http://codereview.chromium.org/5628002
2010-12-02 20:07:48 -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
Chris Sosa
55430beaef Add ability to push to subset of overlays we rev.
We also fix some of the configs for existing configurations.

Change-Id: I34baa9664ff9e91268c8bac976ab2ab0aee51bfb

BUG=chromium-os:9714
TEST=Running now with cbuildbot x86-generic-pre-flight-queue.

Review URL: http://codereview.chromium.org/5531002
2010-12-02 15:49:00 -08:00
David James
59a6600edd Update scripts to avoid using deprecated --test_case syntax.
TEST=Used cbuildbot.py to run tests
BUG=chromium-os:9893

Change-Id: I3c3856fee6fa09c4e2c829f3c8f23d098b4b6bb5

Review URL: http://codereview.chromium.org/5555003
2010-12-02 13:54:48 -08:00