Commit Graph

1008 Commits

Author SHA1 Message Date
Paul Stewart
03b6ebf7d4 Add client_prefix (string) and old_prefix (bool) command line options
cros_copy_upgrade_server can now start the devserver with either prefix.
This is to help the migration from Memento to ChromeOSUpdateEngine.

BUG=none
TEST=none (yet)

Review URL: http://codereview.chromium.org/3304013
2010-09-13 13:28:14 -07: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
Nikita Kostylev
0ae1505d89 Disable OEM partition mounting for test images.
BUG=chromium-os:3828
TEST=Boot with test image. Check that OEM partiotion is not mounted at /mnt/partner_partition

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

Change-Id: Ib7c15010df7d7f30e49149c42034b26a13d69573
2010-09-13 18:58:31 +04:00
David James
cc19005e15 Fix rebuild blacklist so that icedtea isn't rebuilt unnecessarily.
It turns out that my previous rebuild_blacklist code had a bug where
blacklisted packages would get rebuilt unnecessarily. This would result
in slow builds if icedtea was built.

BUG=chromium-os:6628
TEST=Mock case where prebuilts for icedtea are older than packages that
     icedtea depends on.

Change-Id: I498b6499b78ab065109c1fe0e77969028ceff6cb

Review URL: http://codereview.chromium.org/3308027
2010-09-10 18:07:55 -07:00
Tan Gao
012bff9e81 Add Python tests for build_image script
Change-Id: I95bb4518bbfa2931407a90180686845fd9e928e5

BUG=chromium-os:6574
TEST=manually run test script and verified all 4 test cases passed

Review URL: http://codereview.chromium.org/3341024
2010-09-10 16:31:26 -07:00
Tan Gao
cf4eb5b38c Issue 6600: RunCommand should return an object with various attributes
Change-Id: I6b9333fcf1325dbe141ad387f52d85781de96819

BUG=chromium-os:6600
TEST=added 8 test cases for RunCommand (up from zero :-) Ran all tests and
verified all passed. No regression either

Review URL: http://codereview.chromium.org/3307022
2010-09-10 14:50:47 -07:00
Zelidrag Hornung
90a850ac11 Fixed run_remote_test.sh to work properly with the new location of chrome tests
BUG=none
TEST=none

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

Change-Id: I81a8d57b16e7789b0fd6673d9e3b208ce369a575
2010-09-10 14:25:59 -07:00
Kenneth Waters
cebafd2ec3 image_to_usb: Add an option to install to the USB stick.
- This is needed for devices which use a USB stick or MMC card as their
  primary storage.

BUG=1150
TEST=Installed an image to a MMC card, and copied an image to a MMC card.

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

Change-Id: Ieb7f7cf7b8f9c608a23c55176c49b6805e08d382
2010-09-10 11:05:26 -07:00
Mandeep Singh Baines
865a42edee loman: tool for updating local_manifest (initial commit)
BUG=5787
TEST=Ran unittests.

Change-Id: I6b8cc37eb2bf5f81f803f61b886106b6f08f3315

Review URL: http://codereview.chromium.org/3331013
2010-09-10 11:04:17 -07:00
Paul Stewart
12973e562d Install make.globals and create make.profile directory
Some mod_for_test images don't have the files necessary to run
emerge.  Install them.

BUG=none
TEST=Rerun package install

Review URL: http://codereview.chromium.org/3351016
2010-09-09 20:04:11 -07:00
Anush Elangovan
bc2aaf67f8 Make factory emerge the virtual/kernel atom to support profile based kernel
This is dependent on http://codereview.chromium.org/3317012/show

Change-Id: Ifb6e7511619e9f2000448408dd800dd7043a7783

BUG=5847
TEST=new setupboard and build_packages/image for arm/x86-generic with the CL 3317012 included

Review URL: http://codereview.chromium.org/3328016
2010-09-09 19:40:30 -07:00
Anush Elangovan
050c95cab7 Sample chromite spec
Change-Id: I049b31c2fc7369fa58ca43e24c2015e574231d7f

BUG=
TEST=none

Review URL: http://codereview.chromium.org/3369009
2010-09-09 15:45:28 -07:00
Mandeep Singh Baines
4903d4354e ignore: tmp files and .pyc files
BUG=none
TEST=none

Change-Id: I936c60226e75a7f0204331da7ab32b4d9fb0bd3f

Review URL: http://codereview.chromium.org/3316004
2010-09-09 14:25:33 -07:00
Tan Gao
74a07cac15 Issue 6577: remove confirmation to delete output directory
Change-Id: Ib19986121a8988c6cae23527148a7b5d4a58663e

BUG=chromium-os:6577
TEST=(inside chroot) run 4 test cases from src/scripts/, using Ctrl+C to force abort (hence triggering "delete_prompt")
a.) (stdin tty) "./build_image --board=x86-generic < /dev/null", expected = no prompt and delete output dir; actual == expected
b.) (stdout tty) "./build_image --board=x86-generic > foo.txt", expected = no prompt and delete output dir; actual == expected
c.) (normal user case) "./build_image --board=x86-generic",
expected = prompt to delete output dir, if y, output dir is removed; actual == expected
d.) (normal user case) "./build_image --board=x86-generic", expected = prompt to delete output dir, if N, output dir is NOT removed; actual == expected

Review URL: http://codereview.chromium.org/3373003
2010-09-09 11:41:30 -07:00
David James
2e79fe48ce Add shell parameter to allow running commands directly.
For chromite, we often want to run shell commands directly instead of using the
array syntax currently accepted by RunCommand. This makes it easier to run
piped commands, for example.

BUG=chromium-os:6573
TEST=I'm using it in cros_build.

Change-Id: Ic846e257fec4e423b0253d06641eac232545f6f6

Review URL: http://codereview.chromium.org/3323019
2010-09-09 10:49:11 -07:00
Nick Sanders
b3d04a0529 Filter more stuff from shim
Change-Id: I23ee03198acb7a792310799d7a72f8a19ca5445b

Review URL: http://codereview.chromium.org/3331021
2010-09-09 00:01:24 -07:00
Scott Zawalski
57729c3615 Add ListFiles a function to recursively list files in a directory.
Add unittest for ListFiles to cover common use cases.

BUG=
TEST=

Review URL: http://codereview.chromium.org/3325017
2010-09-08 15:59:23 -07:00
Chris Sosa
57e9808254 Fix keywords issue
Change-Id: If89d91624d4e83d8f6923e873bfb57b95fa3b666

BUG=
TEST=Ran with failing packages from buildbot.

Review URL: http://codereview.chromium.org/3330013
2010-09-08 15:03:06 -07:00
Zdenek Behan
ded5074afd cros_mark_all_as_stable: mark packages for all architectures, always
Change-Id: I415f089bc253c1ff9919451cf62c11a27a0bcf6d

BUG=6507
TEST=run cros_mark_all_as_stable and see the three previously ignored packages being uprevved

Review URL: http://codereview.chromium.org/3372002
2010-09-08 14:14:58 -07:00
Scott Zawalski
92097e69a6 Copy cros_build_lib.py to chromite/lib for chromite development
TBR=sosa
BUG=
TEST=

Review URL: http://codereview.chromium.org/3329015
2010-09-08 12:47:28 -07:00
David James
0ac3ac5aa5 Fix cycle cracking once and for all.
While testing parallel_emerge, I found more cases where it would fail
to crack cycles. The issue is that parallel_emerge simply cracks the first
cycle it finds that involves an edge, rather than all cycles that involve an
edge.

Finding all cycles that involve an edge without looping forever is a rather
difficult problem, so I've updated the algorithm to simply keep searching
until it runs out of cycles. Testing this, I haven't found any cases where
the performance of the cycle cracking is a problem. I updated the algorithm
to log its performance stats so we can track this.

TEST=emerge -ep portage
BUG=none

Change-Id: I1cb95ffe9d977b9f8d38626d2d6cdbb766c14669

Review URL: http://codereview.chromium.org/3340010
2010-09-07 16:57:56 -07:00
David James
ffede3b414 Use --usepkgonly in build_image to ensure no accidental builds of packages.
Historically, we used --usepkgonly in build_image to ensure that packages
were not accidentally built during this step. Recently, build_image was
updated to use --usepkg. The benefit of using --usepkg was that it would not
install obsolete binary packages to your image. It was counter-intuitive that
--usepkgonly would install packages to your image that are not actually
installed to your board root. The disadvantage, however, of --usepkg, was that
it sometimes tried to build packages afresh using the image as your build root,
and this failed with strange errors because you're not supposed to do that.

This change fixes build_image to give useful errors by switching back to
--usepkgonly. To fix the problem where --usepkgonly installs packages that are
not installed, we first run eclean-<board> to clean all unused packages from
the board root.

This change is a big improvement because a number of people have run into
strange issues with build_image due to this problem and have had trouble
debugging them.

This change was actually written by Sean Paul, and I am shepherding his change
through for him because he doesn't have a Chromium account yet.

BUG=chromium-os:6437
TEST=
 1) build_packages && build_image should still work
 2) build_packages && ./cros_workon start power_manager && build_image should
    fail with an error that all versions of the power manager are masked. This
    happens because you started working on the power manager, but did not build
    the version of the power manager you were working on before installing it.
 3) Assuming you are working on the power manager, build_packages && build_image
    should succeed because your cros_workon'd version of the package is built.
 4) ( ./cros_workon start power_manager && build_packages &&
      ./cros_workon stop power_manager && build_image ) should fail with the
    same error message as case 2 for similar reasons.
 5) ( ./cros_workon start power_manager && build_packages &&
      ./cros_workon stop power_manager && build_packages && build_image )
    should work because you've built your new version of the stable package.

Change-Id: Ia3858c70997bc6f0ec0b6d1bfaede8d3272a0976

Review URL: http://codereview.chromium.org/3305010
2010-09-07 14:22:38 -07:00
Sameer Nanda
f7cf2ca225 Moved disable_idle_suspend to rootfs from stateful partition for test images.
BUG=chromium-os:6204
TEST=Ran mod_image_for_test.sh, mounted resulting image and verfied
     disable_idle_suspend now shows up under /usr/share/power_manager
     instead of /var/lib/power_manager

Change-Id: Ia34787b364cd5ffa199efc4a36b5d9d691a33c5a

Review URL: http://codereview.chromium.org/3326011
2010-09-07 09:34:12 -07:00
Jon Kliegman
03a4dad734 Whitespace/tab cleanup for cros_workon
Change-Id: I17379dc302fcad0f3a7f59771c48d86df320c0d0

BUG=NONE
TEST=Manual diff inspection.  Ran scripts and confirmed no syntax errors.

Review URL: http://codereview.chromium.org/3335004
2010-09-07 11:12:20 -04:00
vbendeb
68fd512d31 Include saft.conf in the list of scripts modified for test.
This change must accompany http://codereview.chromium.org/3330005/show

Change-Id: If57a726933e4a243e424bdc98ddd577081afe6e2

BUG=chromium-os:6345
TEST=manual
built an image, ran mod_image_for_test on it, then
split the image into partition blobs, mounted part_3 and
checked /etc/init/{openssh-server,iptables,saft}.conf
- they all have the #for_test string removed.
removed.

Review URL: http://codereview.chromium.org/3309006
2010-09-03 18:30:47 -07:00
Nick Sanders
446c2115e4 Don't kill sdcards with boot_tries
USB/SDCard boot devices typicaly don't run software updater,
and won't have success ever set. We never want to try to
fall back to the empty B partition either. The workaround
for this is to set the successful bit regardless of actual
boot success.

bug=6395
Change-Id: I67c625804203b13be9a0c626c404fa38bafb5445

Review URL: http://codereview.chromium.org/3344008
2010-09-03 18:15:35 -07:00
Zdenek Behan
6fb7a3680c cros_workon: print out short summary of what has been done for start/stop
BUG=6325
TEST=cros_workon start and stop for board and host and see it work

Change-Id: Ic0680a273391fdf93b6ebbe0e34497807f31f240

Review URL: http://codereview.chromium.org/3352002
2010-09-03 17:29:09 -07:00
David James
77076b4144 Fix typo in parallel_emerge which was breaking updates.
I put portage when I meant to put portage_pkg, so it was running
code unconditionally that should have only ran when portage was
being upgraded. Oops!

We also should clear the dependency list, since we don't want to
list dependencies other than portage when we're installing portage.

TBR=zbehan
TEST=parallel_emerge
BUG=none

Change-Id: Ic2861d78913f89fc42cedd96ffb125e08287f662

Review URL: http://codereview.chromium.org/3318009
2010-09-02 16:51:03 -07:00
David James
a164ad46dd Update parallel_emerge to restart after upgrading portage in root.
We had a build failure today because portage was upgraded, and
parallel_emerge did not restart after emerging portage. This resulted
in build breakage because parallel_emerge did not pick up all of the
changes (only some of them).

BUG=chromium-os:6394
TEST=Tested that parallel_emerge restarts after upgrading portage in root,
     but not after upgrading portage in board.

Change-Id: I480dc2dc034afb5b9e0468ed6e4d16de608d3d32

Review URL: http://codereview.chromium.org/3304010
2010-09-02 15:13:56 -07:00
Chris Sosa
7de6531962 Faster checkout and cleanup of old builds.
Change-Id: Id81fe4e7bd9cae7a51a45b6ea8a535c4ea9430f8

BUG=
TEST=Ran locally on top of previous build area.

Review URL: http://codereview.chromium.org/3337007
2010-09-02 15:10:48 -07:00
Nick Sanders
ebce8543fc missed feedback from CL
Review URL: http://codereview.chromium.org/3323004
2010-09-02 14:57:34 -07:00
David James
40808fbffa Update parallel_emerge to rebuild packages when use flags change.
parallel_emerge now checks the use flags of installed packages against new
packages, and checks the use flags of binary packages against source packages,
so that, when the appropriate flags are used, we never install packages with
the wrong use flags.

I've also fix related bugs in rebuild_blacklist. Previously, rebuild_blacklist
was too aggressive -- it even blacklisted packages from being rebuilt if they
are explicit workon packages. This bug also causes problems for the use flag
detection code because packages in this list would not get rebuilt when
the use flags changed. So I fixed this too.

Also relatedly, I've fixed our code for checking whether --selective is
enabled to look at the --newuse and --reinstall=changed-use flags. These
flags actually enable --selective implicitly, so we need to honor that for
correct behavior.

BUG=chromium-os:6359
TEST=Made sure that packages get rebuilt / reinstalled when use flags change.

Change-Id: I2d945b552863410ec7b286c3ed55ae4a64336ed5

Review URL: http://codereview.chromium.org/3361002
2010-09-02 13:18:36 -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
Sean O
cd8b1d1729 Use correct log functions for enter_chroot's console spew.
Change-Id: Ie0e05626e3619584d565ff3414f1d1b073c7fc7f

BUG=
TEST=Manually

Review URL: http://codereview.chromium.org/3318005
2010-09-02 17:34:49 +02:00
Sean O
7aace25881 Keep enter_chroot log spew on stderr.
Change-Id: I75d4a90ea703176e5773083ddec7bc687e35837f

BUG=
TEST=tested locally

Review URL: http://codereview.chromium.org/3254012
2010-09-02 15:35:54 +02:00
Elly Jones
7990a0673c scripts: bind ~/.ssh over the chroot's ~/.ssh.
This also mounts the path to our ssh-agent socket (usually in /tmp) inside the
chroot so we can use our external agent.

TEST=None

BUG=None

Change-Id: I543e8b2527be9958c1158234f39ecc34fc9dd0df
Signed-Off-By: Elly Jones <ellyjones@chromium.org>
Signed-Off-By: sosa <sosa@chromium.org>

Review URL: http://codereview.chromium.org/3277006
2010-09-02 09:23:23 -04:00
Nick Sanders
c8cb33699e Allow full build of factory install shim in build_image.
BUG=4951
TEST=Build and boot install shim on legacy bios, on H2C

Review URL: http://codereview.chromium.org/3140028
2010-09-01 21:31:30 -07:00
Paul Stewart
f9d7cf3ce0 remote_cp renamed to remote_cp_to. *shrug*
This function was renamed, so I renamed my reference to it.

BUG=none
TEST=Reran cros_package_to_live

Review URL: http://codereview.chromium.org/3331007
2010-09-01 18:32:37 -07:00
David McMahon
866aa58b44 Created branch 0.8.70.B. Update CHROMEOS_VERSION_BRANCH=71
Change-Id: I4393f7c251fd9718eebc988f6af83f3048ba29e8
2010-09-01 17:38:43 -07:00
Jon Kliegman
3ecded4794 Cause cros_workon to die rather than clobber local_manifest
cros_workon would clobber local edits to local_manifest in many cases
This is a quick fix to prevent it. The proper solution is to actually parse
local_manifest as an XML doc and modify the DOM. Not play tricks with grep.

BUG=chromium-os:6272
TEST=Ran cros_workon against missing local_manifest, auto-generated local_manifest, local_manifest with indented tags. local_manifest with multi-line tags and local_manifest with <remote tags.

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

Change-Id: I008c11a43ac21336575445273453373645f96398
2010-09-01 09:39:44 -04:00
Nick Sanders
b801bec71a fix sign_to_ssd
Change-Id: If642d664163f36b79e3b6d845de0025cc3dc0372

BUG=6264
TEST="resign an image"

Review URL: http://codereview.chromium.org/3273011
2010-08-31 23:05:07 -07:00
Olof Johansson
b154b37ac8 image_to_usb: List available disks when /dev/sdX is specified
I'm lazy and sometimes copy and paste the output at the end of build_image
verbatim and accidentally include the newline at the end. This gives a
more useful output for that case.

Change-Id: I1a4abefa884a91cb75dfe2779c79b3ef4b60e807

BUG=none
TEST=./image_to_usb --from=../build/images/x86-generic/latest --to=/dev/sdX   (and /dev/sde)

Review URL: http://codereview.chromium.org/3212012
2010-09-01 00:04:25 -05: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
Chris Sosa
e13960240b Fix cleanup so we don't have to clobber as much when failures occur
Change-Id: I120c49a38d2a17a2216296a68378fee7345f616a

TBR=petkov

Review URL: http://codereview.chromium.org/3255004
2010-08-30 22:37:28 -07:00
Nick Sanders
ae26a5cbbf * Combine partition setting
* Add dev-rec key to factory installer
* rename factory_install_shim output to be consistent with dev install shim

Change-Id: Ibf8f027edda67626af5c319b4daa164cb53ccfe7

BUG=4382
TEST=Build factory install, build dev install, build normal

Review URL: http://codereview.chromium.org/3286002
2010-08-30 21:59:50 -07:00
Chris Sosa
aaba25d817 Fix clobber. Strip any extra args and treat last arg as config.
Change-Id: I2bf951342c12d954bd1abbc8b878437c648b4ac7

TBR=Scottz
2010-08-30 20:28:11 -07:00
Chris Sosa
f0fcd1acfd Change config's to use .jail for cod[fg]'s
Change-Id: Ib7efb7d5a14371a3eb0dfa4a99992ea096146980

TBR=Config change:  Need to specify subnet for *.jail.
2010-08-30 18:52:46 -07:00
Raja Aluri
32759cfe68 Copying .subversion directory into the chroot,
so that the original users' subversion access permissions are preserved inside the chroot

Change-Id: I486070b3c1a2dda169ae0a95982ba693574e001b

BUG=
TEST=

Review URL: http://codereview.chromium.org/3249008
2010-08-30 18:44:39 -07:00
Ryan Cairns
1703423a77 Runs our BVT suite in a VM
Change-Id: I758c93596d5cbdd6b52b9acc82f4d6e19a326c9f

BUG=5518
TEST=Tested using all the options. All tests listed in the file pass.

Review URL: http://codereview.chromium.org/3107039
2010-08-30 17:03:50 -07:00
Chris Sosa
b1e772a180 Add 9999 revving logic to cros_mark_all_as_stable.
TEST=Ran it and saw appropriate changes.

Change-Id: I5f51e16918993b9dbf53b38cb3a365fafe77c8eb

Review URL: http://codereview.chromium.org/3231007
2010-08-30 15:04:59 -07:00