Commit Graph

2152 Commits

Author SHA1 Message Date
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
e65e500f53 Restore ssh test as its a direct dep of cros_vm_lib.sh
Moved this incorrectly.  This is only used by
cros_vm_lib.sh and therefore should stay wherever it is.

Change-Id: Ib9cc02479f53184a85345288f6abd8fedffb563e

BUG=chromium-os:13948
TEST=NA

Review URL: http://codereview.chromium.org/6747015
2011-03-25 15:39:30 -07:00
Chris Sosa
e0e1427bd9 Remove unit test blacklist from old location.
Change-Id: Id0fa142e0e4705e0ec742dd2c926687140507dc4

BUG=chromium-os:13498
TEST=Ran other CL's without this file.

Review URL: http://codereview.chromium.org/6713120
2011-03-25 14:22:10 -07:00
Chris Sosa
7cf38f011a Fix archive_hwqual to point to non-py file.
Change-Id: I308680be52f5497dab6c970fcad6c5684e42c6b4

BUG=TreeCloser
TEST=Ran cp manually, confirmed target of symlink was copied correctly.

Review URL: http://codereview.chromium.org/6696097
2011-03-24 19:55:28 -07:00
Zdenek Behan
2ecf7d6ddd crosutils: remove some unused scripts
BUG=13499
TEST=none

Change-Id: I2f2475d4334e058d8ddefc80dbbe8dff6ceb88ad

R=anush@chromium.org,kmixter@chromium.org,gauravsh@chromium.org

Review URL: http://codereview.chromium.org/6730047
2011-03-25 02:29:56 +01:00
Zdenek Behan
7454a5e6f5 build_image: always specify filesystem type for mount
BUG=chromium-os:13221
TEST=Run build_images without ext2 loaded

Specifying a filesystem type explicitly for ext* filesystems will avoid
weird fallbacks like mounting ext2 filesystem as ext3 or even ext4.
Instead it attempts to autoload the given filesystem as a module if
available or fail right away.

Change-Id: I6be7f3f994babd8efc8eda97ea9c802e04d98be6

R=dgarret@chromium.org,sosa@chromium.org

Review URL: http://codereview.chromium.org/6696092
2011-03-25 01:25:41 +01:00
Zdenek Behan
aeb8352706 build_image: silence the "No space left on device" message
BUG=chromium-os:12219
TEST=run it, see the message gone

Change-Id: I54174c50dd38e74989e7d63a798dc7f9ea011933

R=thieule@chromium.org

Review URL: http://codereview.chromium.org/6696095
2011-03-25 01:19:16 +01:00
Chris Sosa
ca2d1d3328 Remove unused crosutils scripts.
Change-Id: I56b70a363426cd36edd81b6c3e12d98620a8a16e

BUG=chromium-os:11172
TEST=NA

Review URL: http://codereview.chromium.org/6732044
2011-03-24 17:06:36 -07:00
Chris Sosa
fd2cdec118 Remove testing utilities and fix symlinks.
For run_remote_tests this required "fixing" restart_in_chroot if required.  Right now that script ->only<- works if its run on a scripts being called from src/scripts.  This change makes it more generic by doing this for any script called from within our source tree.

I borrow reinterpret_path_for_chroot from image_to_live.  Other CL to remove it from there.

Change-Id: If717beccd777ac178366d58b91521b9a62d55d85

BUG=chromium-os:11172
TEST=Ran them

Review URL: http://codereview.chromium.org/6730012
2011-03-24 16:06:59 -07:00
Mandeep Singh Baines
afa1b4ca27 cros_workon: remove this file
The version of cros_workon has been deprecated for 3 weeks. Time to
remove.

BUG=11507
TEST=none

Change-Id: Ie843046ab616519109124b04c7b958f6c28020fb

R=robotboy@chromium.org,anush@chromium.org

Review URL: http://codereview.chromium.org/6676105
2011-03-24 14:04:37 -07:00
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
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
Nick Sanders
f9c49add44 Allow file in --from arg
* mount_gpt_image.sh
* image_to_usb.sh

BUG=chromium-os:12367
TEST=mount w/ --from file, check failure with file and -i, block dev and -i, check unmount, check image_to_usb, check --from dir -i file

Change-Id: I8d8604ee7ee83513edd687b0a66cda44f64db1f8

Review URL: http://codereview.chromium.org/6685101
2011-03-21 18:56:04 -07:00
J. Richard Barnette
ce8384d7c6 Build factory test images using the new factorytest-init package.
This also deletes the code from mod_for_factory_scripts/200patchInitScript
that created the files that now come from the new package.

BUG=chromium-os:13258
TEST=Build and boot a factory test image

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

Change-Id: I115d1a2e3afe2fdefc0e07247b21b67e0cf9cc62
2011-03-21 10:00:09 -07:00
Duncan Laurie
1649ba8c1b Revert "Disable the 8042 MUX on our x86 devices."
This reverts commit 4deda9c24f.

BUG=chrome-os-partner:2811, chromium-os:13101
TEST=boot and verify /proc/cmdline
TBR=puneetster

Change-Id: I52990abc01fe5fc2d160d8efbb0a14bff1943ae4
2011-03-18 19:23:01 -07:00
J. Richard Barnette
68fc75f034 Fix numerous style nits and inconsistencies in mod_image_for_test.sh
BUG=none
TEST=build and boot a factory test image

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

Change-Id: Ia0c4c9780fccc91c4464acf84ca4c0327b8ea7bd
2011-03-18 15:18:36 -07:00
Vince Laviano
4f71dfcc84 mod_image_for_test: remove --factory_install flag
This CL removes --factory_install support from mod_image_for_test.
Factory install images are no longer produced using mod_image_for_test.

BUG=chromium-os:12899
TEST=manual

Change-Id: Ia6d6cac07f710cb82473fd696c2717ee660543b6

Review URL: http://codereview.chromium.org/6688015
2011-03-17 15:05:14 -07:00
Vince Laviano
96d116d25e build_image: remove --dev_install flag
The dev install shim is deprecated. This CL removes --dev_install
support from build_image.

This is part of a larger rewrite of build_image to allow it to be the
single script from which all image types are generated.

BUG=chromium-os:12899
TEST=manual

Change-Id: Ic3a49f0d476d198f81001a05c75f24f16bc640c0

Review URL: http://codereview.chromium.org/6694042
2011-03-17 11:32:07 -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
Liam McLoughlin
3b11b450ea Re-enable chroot passthru for AU server environment variable override
Change-Id: I9856fe64942d586281fee09dff15af9d8178b392

BUG=none
TEST=manual

Review URL: http://codereview.chromium.org/6633009
Patch from Liam McLoughlin <hexxeh@hexxeh.net>.
2011-03-14 16:04:07 -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
Darin Petkov
fd73ffb28a Revert "Blacklist pulseaudio and perl to make sure they don't creep in."
This reverts commit 34c838918c.

TBR=

Change-Id: I4d6b3b7f18032feb2f3e58da674cd0ae53ee0e79
2011-03-14 13:29:34 -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
Darin Petkov
34c838918c Blacklist pulseaudio and perl to make sure they don't creep in.
BUG=chromium-os:12984
TEST=x86-mario build_packages, build_image, mod_image_for_test

Change-Id: Ia1fb9c214210c6e58acf25da59f40a7e5ab67d70

Review URL: http://codereview.chromium.org/6674001
2011-03-14 11:16:50 -07:00
Jay Kim
e9d1bbd6d0 Adding "modprobe i2c-dev" before running the script
Change-Id: Iaebc0e55264e5ccda11bea9858438cf67665a357

BUG=chrome-os-partner:2718
TEST=

Review URL: http://codereview.chromium.org/6680021
2011-03-12 19:37:55 -08:00
Duncan Laurie
4deda9c24f Disable the 8042 MUX on our x86 devices.
The use of the mux can cause issues with some EC 8042 controllers and
result in loss of keyboard/trackpad between suspend/resume/reboot cycles.
We will never have more than keyboard+trackpad attached through the 8042
on our devices so using the mux is unnecessary.

BUG=chrome-os-partner:2700
TEST=manual verification that mux is not probed at boot:

Original:
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12

New:
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12

Change-Id: I942ab86eb71941ab072ad6a17d15b067ca94439d

Review URL: http://codereview.chromium.org/6679031
2011-03-12 15:45:19 -08: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
Jim Hebert
314f0642c5 This cros_extract_deps is broken and superceded by chromite/bin/cros_extract_deps
Change-Id: I52fdb083ed9ea1acf8218f559a7b9ea448768532

BUG=chromium-os:12892
TEST=n/a - this removes a script

Review URL: http://codereview.chromium.org/6682007
2011-03-11 13:47:37 -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
Tom Wai-Hong Tam
b42af678be Add transitional flag for ARM kernel signing in mod_image_for_recovery.sh.
Enable the ARM kernel signing procedure in the recovery image. Will remove it
when the procedure is stable.

BUG=chromium-os:12352,chromium-os:1305
TEST=run "build_image" and "mod_image_for_recovery.sh
--crosbug12352_arm_kernel_signing" to create a recovery image.
Then use u-boot recovery mode to boot the recovery image. Successfully verify
and boot the kernel.

Change-Id: I1bf911176c6f3adaebf3aa9abc86488a48a60494

Review URL: http://codereview.chromium.org/6635010
2011-03-08 09:55:10 +08:00
Chris Sosa
a2fcb05593 Only print out ERROR log rather than DEBUG log as DEBUG is overly verbose.
Change-Id: If9603879ed4778a2c6bb037ec9ced0eb86482444

BUG=chromium-os:11682
TEST=Ran on tmp dir with failed test.  Saw error log get printed out rather than debug

Review URL: http://codereview.chromium.org/6639001
2011-03-07 14:18:48 -08:00
Nick Sanders
c750ac2c4d crosutils/mod_for_factory_scripts: don't change VT on factory service stop
In http://codereview.chromium.org/6567004 in order to help developers stopping
factory UI, we've added an "chvt 2". However changing foreground terminal may
hang when executing "shutdown -r" inside Wipe test.

Removing the "chvt" call solved this issue. The only side effect is that
developers executing "initctl stop factory" may end seeing a black scren - and
they need to hit Ctrl-Alt-F2 to get the console back.

BUG=chrome-os-partner:2631
TEST=build a factory image then verified following steps:
     (1) in VT2, do "initctl stop factory, then C-A-F2: screen changed to VT2.
     (2) Execute factory tests until Wipe: reboots immediately when X closed
     (3) Execute Reboot in HWID test: reboots immediately when 'reboot' is ACTIVE

Change-Id: Ib6f44a6ad07db08862929179d0fe21cbbcc2b22a

Review URL: http://codereview.chromium.org/6621041
2011-03-07 10:06:31 -08:00
Nick Sanders
4ed0b8680a Rebuild image for factory
BUG=chrome-os-partner:2442
TEST=run locally - not barf

Change-Id: I0d63227253177d6e6314ae315eaec8ca85f26212

Review URL: http://codereview.chromium.org/6626040
2011-03-06 15:21:42 -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
Mandeep Singh Baines
e39579a9d0 update_kernel: fix to be not rely on kernel command-line
This script recently stopped working when we changed the kernel cmdline.

Fix to be more robust by using rootdev instead.

BUG=12780
TEST=Updated my kernel.

Change-Id: I033f670c5db821863441ea1546c382fce3436c01

Review URL: http://codereview.chromium.org/6628027
2011-03-04 15:58:57 -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
Darin Petkov
47974d4216 Remove obsolete variable pass through.
BUG=chromium-os:12711
TEST=enter_chroot, build_package, build_image

Change-Id: I002ccdaba2c91421da22db2d5a52e82665eab6af

Review URL: http://codereview.chromium.org/6614027
2011-03-03 15:55:04 -08:00
Simon Glass
6e448ae31a Select factory image when --factory is given
prepare_test_image would prepare the correct image (test or factory)
but its return value would always specify the test image. This meant
that image_to_usb.sh would pick up the wrong image.

This commit fixes this.

BUG=chromium-os:12377
TEST=./image_to_usb --from=... --to=/dev/sdb
also with --factory
also with --test

Make sure it picks up the correct image in each case.

Change-Id: I165b604b448a6c938a47e57a667bd5f001626efe

Review URL: http://codereview.chromium.org/6609016
2011-03-03 11:20:54 -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
Mandeep Singh Baines
efba42eb10 cros_workon: start process of removing cros_workon from src/scripts
All tools have been modified to use /usr/bin/cros_workon. So we can
start removing from src/scripts.

For now, print an error so users aren't caught off guard. In a couple
of weeks, I'll remove from src/scripts.

BUG=11507
TEST=none

Change-Id: Ia5f9996bc54fd97b1264cddcf4a0f945fbcb01b4

Review URL: http://codereview.chromium.org/6594132
2011-03-02 18:32:09 -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
Anton Staaf
6adf1a3458 Add optional logging prefix to info, warn and error messages.
BUG=chromium-os:11981
TEST=run cros_sign_bootstub with and without CROS_LOG_PREFIX set.

Change-Id: I320622d4161479dcc29ebdee68e160d94f1d3196

Review URL: http://codereview.chromium.org/6596108
2011-03-02 10:13:14 -08:00
Anton Staaf
6f5262d325 Add check_for_file and check_for_tool functions to common.sh
These functions make it easy to do testing in scripts for required
files and tools and provide useful error messages when the files
or tools are not found.

BUG=chromium-os:11981
TEST=run cros_sign_bootstub in configurations that test all paths in
these functions.

Change-Id: Ia63cfabd1eecba6473331b756486745d71e6b699

Review URL: http://codereview.chromium.org/6591056
2011-03-02 09:35:54 -08:00
Darin Petkov
a586930227 Switch build_image to use cros_set_lsb_release directly.
Also remove obsolete customize_rootfs symlink.

BUG=chromium-os:4628
TEST=build_image

Change-Id: Id2af4b87585c3e127cffd02525cc0da5fb11bbfd

Review URL: http://codereview.chromium.org/6602062
2011-03-01 17:15:59 -08: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
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