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

Side by Side Diff: build/android/pylib/cmd_helper.py

Issue 22640007: Add an environment variable override to the default output name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indenting Created 7 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """A wrapper for subprocess to make calling shell commands easier.""" 5 """A wrapper for subprocess to make calling shell commands easier."""
6 6
7 import os 7 import os
8 import logging 8 import logging
9 import pipes 9 import pipes
10 import signal 10 import signal
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 tmpout.seek(0) 93 tmpout.seek(0)
94 stdout = tmpout.read() 94 stdout = tmpout.read()
95 tmpout.close() 95 tmpout.close()
96 if len(stdout) > 4096: 96 if len(stdout) > 4096:
97 logging.debug('Truncated output:') 97 logging.debug('Truncated output:')
98 logging.debug(stdout[:4096]) 98 logging.debug(stdout[:4096])
99 return (exit_code, stdout) 99 return (exit_code, stdout)
100 100
101 101
102 class OutDirectory(object): 102 class OutDirectory(object):
103 _out_directory = os.path.join(constants.DIR_SOURCE_ROOT, 'out') 103 _out_directory = os.path.join(constants.DIR_SOURCE_ROOT,
104 os.environ.get('CHROMIUM_OUT_DIR','out'))
104 @staticmethod 105 @staticmethod
105 def set(out_directory): 106 def set(out_directory):
106 OutDirectory._out_directory = out_directory 107 OutDirectory._out_directory = out_directory
107 @staticmethod 108 @staticmethod
108 def get(): 109 def get():
109 return OutDirectory._out_directory 110 return OutDirectory._out_directory
OLDNEW
« 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