Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Issue 6576016: RunCommand was catching and rethrowing an exception, which seemed to generate (Closed)

Created:
9 years, 10 months ago by dgarrett
Modified:
9 years, 7 months ago
Reviewers:
keybuk, sosa
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

RunCommand was catching and rethrowing an exception, which seemed to generate extra noise in the final exception output. This change stops catching and rethrowing the same exception, and generally makes the RunCommand slightly more readable (if longer). Some unit tests are added, but they only test RunCommand, and not all options to RunCommand. BUG=chromium-os:11717 TEST=Manual, and new lib/cros_build_lib_unittest Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=01c8423

Patch Set 1 #

Total comments: 9

Patch Set 2 : Fix review nits, add Exception test. #

Patch Set 3 : Add docstrings. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -19 lines) Patch
M lib/cros_build_lib.py View 1 1 chunk +26 lines, -19 lines 0 comments Download
A lib/cros_build_lib_unittest.py View 1 2 1 chunk +76 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
dgarrett
9 years, 10 months ago (2011-02-24 00:02:51 UTC) #1
sosa
Thanks for adding a unittest! http://codereview.chromium.org/6576016/diff/1/lib/cros_build_lib.py File lib/cros_build_lib.py (right): http://codereview.chromium.org/6576016/diff/1/lib/cros_build_lib.py#newcode76 lib/cros_build_lib.py:76: Info('PROGRAM(%s) -> RunCommand: retrying ...
9 years, 10 months ago (2011-02-24 00:23:36 UTC) #2
dgarrett
http://codereview.chromium.org/6576016/diff/1/lib/cros_build_lib_unittest.py File lib/cros_build_lib_unittest.py (right): http://codereview.chromium.org/6576016/diff/1/lib/cros_build_lib_unittest.py#newcode7 lib/cros_build_lib_unittest.py:7: """Unit tests for ctest.""" On 2011/02/24 00:23:36, sosa wrote: ...
9 years, 10 months ago (2011-02-24 01:06:46 UTC) #3
sosa
9 years, 10 months ago (2011-02-24 01:30:32 UTC) #4
LGTM but before you commit, can you add short docstrings for each test method. 
These are very useful because when a unit test fails, the unittest harness
prints out the docstring of the failing test.

Powered by Google App Engine
This is Rietveld 408576698