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

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

Issue 22903016: [android] Adds constants.GetOutDirectory() and converts test scripts to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix provision_devices.py which never set the build type Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/chrome_test_server_spawner.py ('k') | build/android/pylib/constants.py » ('j') | 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 tmperr.close() 90 tmperr.close()
91 if stderr: 91 if stderr:
92 logging.critical(stderr) 92 logging.critical(stderr)
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
101
102 class OutDirectory(object):
103 _out_directory = os.path.join(constants.DIR_SOURCE_ROOT,
104 os.environ.get('CHROMIUM_OUT_DIR','out'))
105 @staticmethod
106 def set(out_directory):
107 OutDirectory._out_directory = out_directory
108 @staticmethod
109 def get():
110 return OutDirectory._out_directory
OLDNEW
« no previous file with comments | « build/android/pylib/chrome_test_server_spawner.py ('k') | build/android/pylib/constants.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698