Commit Graph

46 Commits

Author SHA1 Message Date
Chris Sosa
8e071cc2b1 Wipe the autotest package directory before rebasing from client.
This script is a bit of mess in general as it copies client directories
back onto client proper. This creates issues when you add additional
directories that might exist in client to base that either the
FACTORY_TEST_INSTALL_MASK isn't expecting.

BUG=chromium-os:26561
TEST=Ran build_image factory_test with/without packages directory.

Change-Id: I692d44f7c56668d689350d0f3a2a2c2790c6c13a
Reviewed-on: https://gerrit.chromium.org/gerrit/17713
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-03-09 12:41:46 -08:00
Hung-Te Lin
d32c59fe47 crosutils: build factory test image by emerge commands
The factory test image was created by using rsync from build artifacts
in chroot, which has some concerns:
 - Runtime dependencies of autotest-factory won't be picked into image.
 - If a developer skips build_package and builds image by using only pre-built
   binary packages, he will get nothing in factory test image.
 - It's hard for developers to figure out how and when his changes will be
   merged to next build_image (cros_workon does not really work).
 - Output image will be definitely different for every developers, also the
   official build bots.
 - If developers never wipes his chroot (setup_board), the factory test image
   will grow until out of space. (For example, my environment outputs a 825M
   image while the official buildbot generates only 563M for same ToT source).

This CL changes image build command to using portage emerge, so that output
image can be prepared faster and smaller, and easier for maintenance.

BUG=chromium-os:3335
TEST=./build_packages; ./build_image --factory  # Image starts factory UI successfully
     # Also tried tests in test_list.all, seems fine.

     time ./mod_image_for_test.sh --factory --force_copy --no_inplace
     # time: 3m2s => 1m55s, factory test image data: 825/563M => 378M

     ./build_image --factory_install # factory install shim is also fine

Change-Id: I82b4505c74cd31e718aaff4a319d50b69b2c852c
Reviewed-on: https://gerrit.chromium.org/gerrit/14473
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2012-01-20 17:54:11 -08:00
Hung-Te Lin
662588686a crosutils: clean up factory test image modification scripts
This is the counterpart of http://gerrit.chromium.org/gerrit/6992 ,
which moves init modification from scripts folder into ebuild file.
The 'customizeRelease' is also already deprecated.

BUG=chromium-os:9596
TEST=build_images --factory # pass

Change-Id: I8087f627f4b13d9f6b1d4bf6003630298a87c627
Reviewed-on: http://gerrit.chromium.org/gerrit/7040
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-08-31 23:37:12 -07:00
Hung-Te Lin
54a83b774c mod_for_factory: remove 500populateQualDbs
The '500populateQualDbs' script is now deprecated by the new chromeos-hwid
ebuild package.

HWQual database are merged into images automatically, no more need for
post-processing.

QUALDB and --qualdb are also removed, with typo in comments fixed.

BUG=chrome-os-partner:4276
TEST=./build_image --factory

Change-Id: I76d9a72943567444e26200fccc6fe5dff95b2687
Reviewed-on: http://gerrit.chromium.org/gerrit/3431
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-06-30 19:04:38 -07:00
Scott James Remnant
3cb23de123 mod_for_factory: adjust patch to update-engine.conf
update-engine.conf has changed, adjust this patch to match.

BUG=chromium-os:16079
TEST=none

Change-Id: I90572f0a42bcc6eb5c501fa32212d846f2357757
Reviewed-on: http://gerrit.chromium.org/gerrit/2431
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
2011-06-10 13:35:57 -07:00
Scott James Remnant
88f81686c4 mod_for_factory: adjust patch to ui.conf
ui.conf has changed, adjust this patch to match.

BUG=chromium-os:16079
TEST=none

Change-Id: I33d0bb7150a549c7203f22f4c3a05bfaea13379a
Reviewed-on: http://gerrit.chromium.org/gerrit/2430
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
2011-06-10 13:33:26 -07:00
Scott James Remnant
a22bde8f67 mod_for_factory: adjust patch to chrontel.conf
chrontel.conf has changed, adjust this patch to match.

BUG=chromium-os:16079
TEST=none

Change-Id: I50709efe1d37084be5d974ba5a6353e6039d65f1
Reviewed-on: http://gerrit.chromium.org/gerrit/2394
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
2011-06-09 15:50:31 -07:00
Scott James Remnant
d5061a7be9 mod_for_factory: adjust patch to boot-complete
mod_for_factory patches boot-complete since it disables the ui job,
meaning that login-prompt-visible will never happen. The correct
place to move "boot-complete" to is "started boot-services" - this
means all boot services are done.

system-services depends on boot-complete, so this means that without
ui, system-services will be run on started boot-services which is
what we want.

BUG=chromium-os:16079
TEST=none

Change-Id: I93b86eefe8df9da2e9fbff75aa1e9b80a1f9ad1b
Reviewed-on: http://gerrit.chromium.org/gerrit/2323
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Scott James Remnant <keybuk@chromium.org>
2011-06-09 15:49:01 -07:00
Olof Johansson
dd5e04a875 fix factory scripts based on nvrm changes
Change-Id: Iaa0d1d8325894d3e300275bab99a04e4f83ec9b4

BUG=chromium-os:13971
TEST=Run mod_image_for_test -f, make sure it doesn't break.

Review URL: http://codereview.chromium.org/6826001
2011-04-08 10:00:01 -07:00
Hung-Te Lin
a05ed3172e mod_image_for_factor: never touch firmware for factory test images
we don't want any possibility for firmware to be changed in factory setup

BUG=none
TEST=build_image; image_to_usb --factory

Change-Id: Ibef767ea621193afb7fbca5ea96120a506891dcb

R=nsanders@chromium.org

Review URL: http://codereview.chromium.org/6764010
2011-04-01 15:31:02 +08:00
Hung-Te Lin
9cac2869c7 cros mod_image_for_factory: don't enable update engine for factory test images
To get best factory test image performance, we should disable update engine.

BUG=chromium-os:13613
TEST=image_to_usb --factory --to=FACTORY
     then verified /etc/init/update-engine.conf is disabled.

Change-Id: Ifb7b6c821f434ee68625ffea0eb7907c38d77315

R=nsanders@chromium.org

Review URL: http://codereview.chromium.org/6759023
2011-03-30 18:42:43 +08: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
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
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
Hung-Te Lin
fa2dd93743 crosutils: fixing factory upstart script to allow stopping factory test ui.
Developers may want to run their own factory test UI after finishing the
Google official one, so the "factory" test should be stoppable.

BUG=chrome-os-partner:2456
TEST=build a factory image, install and start factory testing UI,
     then switch to VT2, login and type: "initctl stop factory"
     the screen should switch to a virtual terminal (VT2) without
     hanging / reboot.

Change-Id: I6a9d1c951d48d448f5c83c5f645ea531e8fd1499

Review URL: http://codereview.chromium.org/6567004
2011-02-24 16:32:35 +08:00
Hung-Te Lin
da36382f03 crosutils: let factory test uses its own results folder
The factory tests should not use default results folder, otherwise a developer
running autotests by command line would corrupt the whole factory test
framework.

Since tools/autotest cannot support additional parameters and our state (to
continue) is clear, the command is also changed to directly invoke bin/autotest.

BUG=chrome-os-partner:2378
TEST=manually patched into a factory test device and verified factory
     UI works at new boot and a reboot.

Change-Id: I9f6ef31114bdda740319072c6f9ac624f6850b95

Review URL: http://codereview.chromium.org/6529046
2011-02-16 18:37:03 +08:00
Daniel Erat
3a13f91195 scripts: Update factory mod diff for boot-complete job.
I'm changing the boot-complete init script to start on
login-prompt-visible instead of login-prompt-ready in
http://codereview.chromium.org/5868004/.

This also adds a missing description and fixes an outdated
email address.

BUG=chromium-os:10349
TEST=ran mod_image_for_test.sh with --factory and with --factory_install and checked that resulting image contained boot-complete.conf change

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

Change-Id: I709bc2b4eaaccd222b31388633522c32514206ac
2010-12-17 16:36:02 -08:00
Tom Wai-Hong Tam
fb5ce169ee For the boards already have DB directories, remove the default DB.
The default DB is an all-pass DB. If no DB found, the hardware_Components test
falls back to the all-pass one and skip the real check. In order to prevent
skipping the check, remove the default DB in the boards already have DB
directories.

TEST=run "image_to_usb.sh --factory" and check the default DB removed
BUG=chrome-os-partner:1737

Change-Id: Ia25f2551a5eba3a95fe736e86bfe52c340f329a8

Review URL: http://codereview.chromium.org/5339011
2010-11-30 11:22:50 +08:00
Kenneth Waters
b2d2212bb9 mod_for_factory: Fix factory images for tegra2
- Conditionally patch chrontel.conf
- Add a patch for nvrm to start on factory, so that X can start.

BUG=crosbug.com/p/1721
TEST=Built and run factory image for tegra2_seaboard

Change-Id: Ied87b6d959f940ef8e99e124ab419fdeea48aa26

Review URL: http://codereview.chromium.org/5126005
2010-11-24 12:29:40 -08:00
Nick Sanders
1c4026c7a7 Fix factory patching
BUG=7535
TEST=build factory, no errors, verify patches.

Change-Id: I480633cc7a0824cd2dfab82acd6a82f952cd7daf

Review URL: http://codereview.chromium.org/5332004
2010-11-23 22:03:25 -08:00
Nick Sanders
7f5e4b2d30 Fix typo
BUG=chrome-os-partner:1583
TEST=no

Change-Id: Iac591be8ce3ef1d8594a959f68f6cb7f114af2e4

Review URL: http://codereview.chromium.org/5314005
2010-11-23 16:30:17 -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
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
Elly Jones
01693fec80 scripts: Remove bogus patch to software-update.conf
This caused a build break after http://codereview.chromium.org/3995007 was
committed, since we try to patch a now-nonexistent file.

BUG=None
TEST=Adhoc
./mod_image_for_test.sh --factory_install doesn't hang

Change-Id: Iac299c850765eedfcefcffb80c385b0e8c0fa277
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Kliegs <kliegs@chromium.org>

Review URL: http://codereview.chromium.org/3973004
2010-10-22 09:47:36 -04:00
Tom Wai-Hong Tam
146e8e8a80 Remove GBB-populating script since we no longer prebuild GBB.
Change-Id: Ia4cb505c27a4f868ff409968e3ba79603308e234

Review URL: http://codereview.chromium.org/3602019
2010-10-07 02:28:59 +08:00
Tom Wai-Hong Tam
10a980eeb6 Reflect the change of QualDbs location moved.
Reflect the change of https://chromereview.prom.corp.google.com/1638035

TEST=manaul
 - image_to_usb --factory
 - run factory test
   -- match HWID
   -- write GBB
   -- reboot
   -- check HW components

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

Change-Id: Id97153fe1d06917ac13d1470866c17d5e4acdc9d
2010-09-14 02:52:26 +08:00
Tom Wai-Hong Tam
1e0dcbd15c Reflect the change that moves startx.sh to a new place.
Reflect the change: http://codereview.chromium.org/3277004

BUG=chrome-os-partner:501 fix the unexpected EOF error
TEST=run image_to_usb --factory and start factory ui on a device

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

Change-Id: Ieec1237d51c0ca3041be7934405ba44b31f04ea6
2010-08-31 05:35:00 +08:00
Tom Wai-Hong Tam
bfafc9cfd2 Populate the GBB blob files to factory image.
We use the filename format gbb_${BOARD}_${HWID} for GBB blob files and
place them in the same directory of site_tests/factory_WriteGBB, but in
private git.

Actually, these files will be automatically put in the factory image.
This change is to remove those not belonging to the same board.

Also do some fixes and rename QualDbs stuffs.

TEST=run image_to_usb.sh and check the gbb files.
BUG=chrome-os-partner:789

Change-Id: I5913a14eb3ceef5abfdf1a87156faa6bb7dbd561

Review URL: http://codereview.chromium.org/3111014
2010-08-21 04:03:55 +08:00
Todd Broch
2c9e3cf673 disable chrontel server for factory test (will start via deps/factory/startx.sh) directly
BUG=none
TEST=manual

Review URL: http://codereview.chromium.org/3087012
2010-08-06 10:52:03 -07:00
Tom Wai-Hong Tam
2272ae5ce2 Handle Qual DBs based on default board name.
All Qual DBs may be existed in the same directory of hardware_Components (overlaid internal git). So, if QUALDB is not specified, first check the existence of DBs matched the board name. Then remove other DBs not belonging to the board.

TEST=build_packages, build_image, image_to_usb

Review URL: http://codereview.chromium.org/3032036
2010-08-05 14:19:45 +08:00
Elly Jones
c5fe33d940 Revert "Copy multiple qualified DBs to the image based on the board name."
This commit breaks the build for x86-full-fast-generic at least. It causes a
file to be copied to itself during the build archive step:
http://build.chromium.org/buildbot/chromiumos/builders/x86%20generic%20full%20fast/builds/128/steps/archive_build/logs/stdio

TEST=None
BUG=None

This reverts commit 1cf4329681.

Signed-Off-By: Elly Jones <ellyjones@chromium.org>
Signed-Off-By: Nathan Williams <njw@chromium.org>

Review URL: http://codereview.chromium.org/2808069
2010-07-27 10:40:10 -04:00
Tom Wai-Hong Tam
1cf4329681 Copy multiple qualified DBs to the image based on the board name.
The DBs are named in the format of qualified_components_${BOARD}_${HWQUALID}.
If only one hwqual id for the board, named in qualified_components_${BOARD}.

Review URL: http://codereview.chromium.org/3038026
2010-07-27 17:02:35 +08:00
Tom Wai-Hong Tam
a1feb99412 TBR: Issue 2861071: Fix name changed of init script dump-boot-stats.conf to boot-complete.conf.
A file name changed which breaks the factory test phase on the builders.

This change was LGTM'd but not submitted.
Patch from Tom Wai-Hong Tam <waihong@chromium.org>.

Change-Id: I961515ba4667891d82833035f2d312a653f746fd
2010-07-21 16:37:25 -05:00
Tom Wai-Hong Tam
ab3682d570 If qualified components not specified, use the one based on board name.
Review URL: http://codereview.chromium.org/2965013
2010-07-19 00:22:42 +08:00
Tammo Spalink
c75941a05d Move factory UI files to autotest repo.
Review URL: http://codereview.chromium.org/2825014
2010-06-22 16:09:04 +08:00
Tammo Spalink
8d43b4bf8c Add support for sequences of fully automated tests.
Paired with CL: http://codereview.chromium.org/2322004

Review URL: http://codereview.chromium.org/2367001
2010-06-07 16:37:55 +08:00
Tom Wai-Hong Tam
7e12aadbbd Fix missing path of factory files.
Review URL: http://codereview.chromium.org/2562001
2010-06-07 16:11:24 +08:00
Tammo Spalink
f726161e09 This goes together with:
http://codereview.chromium.org/1810006/show

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/1937002
2010-05-27 13:18:56 +08:00
Nick Sanders
7c982f7398 Update factory installer, factory test
* Fix build breaks
* Update to work with EFI bios

Review URL: http://codereview.chromium.org/2132008
2010-05-19 22:17:08 -07:00
Tom Wai-Hong Tam
2acef61815 Change the path of qualified_components to the autotest directory.
So no need of the directory /usr/local/manufacturing/.

Review URL: http://codereview.chromium.org/1816004
2010-05-06 14:14:02 +08:00
Nick Sanders
1bec876896 Clean upstart for factory test
* Leave ui.conf there, not run by default.
* dump autotest log into /dev/tty1
* Don't let tty1 eat keayboard events.

Review URL: http://codereview.chromium.org/1742018
2010-04-29 21:51:25 -07:00
Tom Wai-Hong Tam
bf772cffaa Skip dropping caches in each test and between iterations during factory tests.
Dropping caches (writing back all dirty pages to disk and clearing all the caches) is not necessary for factory tests. It can reduce the latency significantly. The scale is about 27s -> 3s, for running 2 empty tests.

Review URL: http://codereview.chromium.org/1780011
2010-04-29 14:57:37 +08:00
Tom Wai-Hong Tam
d036780bd1 Make modify-image-for-factory scripts more readable.
Review URL: http://codereview.chromium.org/1755012
2010-04-28 18:50:02 +08:00
Nick Sanders
3c8023380e Allow boot directly into mfg test.
Add feature to mod_image_for_test to patch rootfs.
Change initctl path to get network but no chrome.
./image_to_usb.sh --install_mfg --install_autotest --test_image
which calls ./mod_image_for_test.sh --manuf

Review URL: http://codereview.chromium.org/1542011
2010-04-16 19:53:55 -07:00