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

Issue 106923002: Don't use sys.exit() in build_utils.CheckCallDie(). (Closed)

Created:
7 years ago by newt (away)
Modified:
7 years ago
Reviewers:
cjhopman
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

Don't use sys.exit() in build_utils.CheckCallDie(). Calling sys.exit() in a thread spawned by multiprocessing.pool.ThreadPool causes an infinite hang that even SIGINT can't fix. This is bad. Instead of calling sys.exit(), raise an exception, crafted so that the important information (the failed command's stdout and stderr) comes after the stacktrace and the copyable command. This also renames CheckCallDie() to CheckOutput() and changes it to print stderr but not stdout by default. Suppressing stderr has hid bugs in the past (e.g. aapt crunch failures), and hiding stdout is what we usually want anyway. R=cjhopman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239276

Patch Set 1 #

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -52 lines) Patch
M build/android/gyp/ant.py View 1 1 chunk +9 lines, -1 line 1 comment Download
M build/android/gyp/create_standalone_apk.py View 1 chunk +2 lines, -3 lines 0 comments Download
M build/android/gyp/dex.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/emma_instr.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/finalize_apk.py View 2 chunks +2 lines, -2 lines 0 comments Download
M build/android/gyp/gcc_preprocess.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/jar.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/jar_toc.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/javac.py View 1 chunk +1 line, -2 lines 0 comments Download
M build/android/gyp/process_resources.py View 2 chunks +2 lines, -2 lines 0 comments Download
M build/android/gyp/proguard.py View 1 chunk +2 lines, -1 line 0 comments Download
M build/android/gyp/strip_library_for_device.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/util/build_utils.py View 2 chunks +29 lines, -34 lines 0 comments Download
M build/android/gyp/write_ordered_libraries.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
newt (away)
PTAL. I think this a good solution, but it does invert the order of the ...
7 years ago (2013-12-05 18:20:06 UTC) #1
cjhopman
I like this. lgtm. https://codereview.chromium.org/106923002/diff/20001/build/android/gyp/ant.py File build/android/gyp/ant.py (right): https://codereview.chromium.org/106923002/diff/20001/build/android/gyp/ant.py#newcode27 build/android/gyp/ant.py:27: sys.stderr.write('Tip: run the ant command ...
7 years ago (2013-12-06 17:31:59 UTC) #2
newt (away)
7 years ago (2013-12-06 23:26:06 UTC) #3
Message was sent while issue was closed.
Committed patchset #2 manually as r239276 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698