18 Commits

Author SHA1 Message Date
David James
0614c4a11c Switch from gsdview.appspot.com to commondatastorage.googleapis.com.
This server requires that unsafe characters are quoted in URLs, so we do that
here.

Change-Id: I6b7c430671b02a8da11777029b0fdb59a87dcae1

BUG=chromium-os:9902
TEST=Ran unit tests. Ran example buildbot run and diff'd new version and old
     version of Packages file.

Review URL: http://codereview.chromium.org/5542002
2010-12-07 13:39:16 -08:00
David James
c15b609efa Fix handling of array arguments in chromite cros_build_lib.
Change-Id: Ibc8d603708bb239a125d0c642deecdc3a171ca63

BUG=chromium-os:9759
TEST=cros_build_lib.RunCommand(['ls', '-l'])

Review URL: http://codereview.chromium.org/5347008
2010-12-02 10:21:49 -08:00
David James
2df2dd5d23 Remove more broken urlparse.urljoin examples.
urlparse.urljoin('scheme:foo/bar/', 'baz') == 'baz', so it doesn't work the
way I expected. Instead, let's use regular string joins.

BUG=chromium-os:5311
TEST=Examine example Packages file.

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

Change-Id: I1d81dd7a3a79ca6c1f0750993535d3b66696ec23
2010-11-30 19:06:30 -08:00
David James
adcb314d9f Treat packages with missing SHA1 as not duplicated.
TBR=Needed to fix preflight build.
BUG=chromium-os:5311
TEST=Remove SHA1 from one of the packages in the Packages file, make sure
     that prebuilt.py treats that as a duplicated package. Also run new
     unit tests. Also ran buildbot.py

Change-Id: Ie35a7c818fd659bcc2296605ace850aee2a88448

Review URL: http://codereview.chromium.org/5370005
2010-11-30 15:34:20 -08:00
David James
63c51c4d3c Update cbuildbot.py and prebuilt.py to deduplicate preflight prebuilts.
Preflight prebuilts reference the last full build, so they should always be complete as long as the last full build is still there.

Also add host prebuilts to the preflight prebuilts.

BUG=chromium-os:5311
TEST=Run unit tests for cbuildbot and prebuilt.py. Test runs of cbuildbot.py with --dryrun.

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

Change-Id: Id95f94c02cc2f6cbd70a029d4f8b94617b7cc071
2010-11-30 11:45:11 -08:00
Doug Anderson
ec5d7f0d2d Code cleanup: comments, docstrings, and gpylint fixes.
Most of this is from this code review:
  http://codereview.chromium.org/4175007/diff/1/2

I also ran the code through gpylint and fixed some of the stuff,
like making quoting consistent.

Change-Id: Icb3896dbd4e975c7ea4687d58efd6372adfcc3c9

BUG=chromium-os:8205
TEST=Ran ./cros_changelog 0.7.48.0 and saw error; also ran ./cros_changelog 0.9.98.3

Review URL: http://codereview.chromium.org/4263001
2010-11-08 14:46:03 -08:00
Doug Anderson
48849e2dea Added option for including priority/milestone to cros_changelog.
You can access this by passing:
   --tracker-user="user@chromium.org"
   --tracker-passfile="fileContainingPassword"

...to access anonymously, just set --tracker-user=""

...if you don't include the --tracker-user option, we won't try to
fetch priority/milestone.

To use this feature, you need the GData library.  Until we get that
put in hard-host-depends, the script will simply print instructions
for installing GData if it detects that you don't have it.

At the moment, I believe that logging in isn't giving you any extra
access.  Therefore, any bugs that don't allow anonymous access will
not show their priority/milestone.  I am working on figuring out what
the problem is there.

Change-Id: If388c20c43ee2fb0c1ab8f748ffea65e354eeb1e

BUG=chromium-os:8205
TEST=Ran ./cros_changelog 0.9.104.0 --tracker-user="" and verified that some bugs got priority/milestone.

Review URL: http://codereview.chromium.org/4102013
2010-10-29 14:50:15 -07:00
David James
6ceddf089f Update cros_changelog to support sort-by-date option.
Other changes:
  1. Clean up revision handling to be more forgiving if people want to use
     things that don't start with "cros/". Instead, we only enforce that
     people use tags if they want to use the one-argument version of
     cros_changelog.
  2. Tags are quoted in the command-line so that people can, for instance,
     diff 'cros/master{2 days ago}' vs 'cros/master{1 day ago}'.

Change-Id: I28c7d77ae83256d4c28411ef589f3e726cc81d80

BUG=chromium-os:8205
TEST=Ran ( ./cros_changelog 0.9.104.0 cros/master > /tmp/test1.html &&
          ./cros_changelog --sort-by-date 0.9.104.0 cros/master > /tmp/test2.html )
    Both commands print changes between 0.9.104.0 and master, but the second command prints results sorted by date.

Review URL: http://codereview.chromium.org/4130009
2010-10-28 13:59:57 -07:00
David James
eb57914ebc Tool for printing changelog descriptions.
This is similar to gencl but supports more features and is written in Python.

BUG=chromium-os:8205
TEST=Ran ( ./cros_changelog 0.9.102.0 cros/master > /tmp/test1.html &&
           ./cros_changelog 0.9.102.0 > /tmp/test2.html )
     First command prints changes between 0.9.102.0 and master. Second
     command prints changes between 0.9.102.0 and previous release.

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

Change-Id: I1a81f7d02e4164a4c61aeaad0c01903658571260
2010-10-27 19:42:28 -07:00
Scott Zawalski
e773e514bf Add in __init__.py files in both chromite and chromite/lib for importing 2010-09-28 09:46:52 -07:00
Tan Gao
e5ba918044 TBR: davidjames
Change-Id: I0b8d4277b142185e69abcd8e8bb2dce6395abc56
2010-09-22 09:34:27 -07:00
David James
a48cb7e19d Prototype cros_build_packages, which builds and extracts build tarballs.
Usage: cros_build_packages [options]

Options:
  -h, --help       show this help message and exit
  --board=BOARD    The board to build packages for.
  --debug          Include debug symbols.
  --nowithdev      Don't build useful developer friendly utilities.
  --nowithtest     Build packages required for testing.
  --nowithfactory  Build factory installer
  --nousepkg       Don't use binary packages.
  --nousetarball   Don't use tarball.
  --nofast         Don't merge packages in parallel.

BUG=chromium-os:6604
TEST=Ran cros_build_packages and ./cros_build_packages --nousetarball

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

Change-Id: Ida9ed6375c2ce4acde304bd3f2796b4419f1d376
2010-09-16 13:05:06 -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
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
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
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
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