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

Unified Diff: build/gn_run_binary.py

Issue 2820753004: Make gn_run_binary.py print out the exit code on error. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/gn_run_binary.py
diff --git a/build/gn_run_binary.py b/build/gn_run_binary.py
index 7d83f6136fd70e05e0c3628b527a094f1b69a2b8..130c84311470b37b3e51c2b7fed478dacba015ee 100644
--- a/build/gn_run_binary.py
+++ b/build/gn_run_binary.py
@@ -8,8 +8,8 @@ Run with:
python gn_run_binary.py <binary_name> [args ...]
"""
-import sys
import subprocess
+import sys
# This script is designed to run binaries produced by the current build. We
# always prefix it with "./" to avoid picking up system versions that might
@@ -19,4 +19,7 @@ path = './' + sys.argv[1]
# The rest of the arguements are passed directly to the executable.
args = [path] + sys.argv[2:]
-sys.exit(subprocess.call(args))
+ret = subprocess.call(args)
+if ret != 0:
+ print '%s failed with exit code %d' % (sys.argv[1], ret)
+sys.exit(ret)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698