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

Unified Diff: build/toolchain/wrapper_utils.py

Issue 2617283002: Add Clang static analyzer to Clang toolchain defs in GN (Closed)
Patch Set: wez feedback Created 3 years, 11 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
Index: build/toolchain/wrapper_utils.py
diff --git a/build/toolchain/wrapper_utils.py b/build/toolchain/wrapper_utils.py
index 163a292c165cc0b484804aebfa693c02e5e7e871..481c612384862dea98efb3793a4d42e5d1e8ac82 100644
--- a/build/toolchain/wrapper_utils.py
+++ b/build/toolchain/wrapper_utils.py
@@ -92,14 +92,13 @@ def ExtractResourceIdsFromPragmaWarnings(text):
return used_resources
-def CaptureCommandStderr(command):
- """Returns the stderr of a command.
+def RunCommand(command, env=None):
+ """Runs a command and returns its status code.
Args:
- args: A list containing the command and arguments.
- cwd: The working directory from where the command should be made.
+ command: A list containing the command and arguments.
env: Environment variables for the new process.
"""
- child = subprocess.Popen(command, stderr=subprocess.PIPE)
- _, stderr = child.communicate()
- return child.returncode, stderr
+ child = subprocess.Popen(command, env=env)
+ _, _ = child.communicate()
+ return child.returncode

Powered by Google App Engine
This is Rietveld 408576698