Home | History | Annotate | Download | only in utils

Lines Matching refs:cwd

93 def Popen(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
95 args=args, cwd=cwd, stdout=stdout, stderr=stderr,
100 def Call(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
101 pipe = Popen(args, stdout=stdout, stderr=stderr, shell=shell, cwd=cwd,
107 def RunCmd(args, cwd=None):
113 cwd: If not None, the subprocess's current directory will be changed to
114 |cwd| before it's executed.
119 logging.info(str(args) + ' ' + (cwd or ''))
120 return Call(args, cwd=cwd)
123 def GetCmdOutput(args, cwd=None, shell=False):
129 cwd: If not None, the subprocess's current directory will be changed to
130 |cwd| before it's executed.
137 (_, output) = GetCmdStatusAndOutput(args, cwd, shell)
141 def _ValidateAndLogCommand(args, cwd, shell):
149 if cwd is None:
150 cwd = ''
152 cwd = ':' + cwd
153 logging.info('[host]%s> %s', cwd, args)
157 def GetCmdStatusAndOutput(args, cwd=None, shell=False):
163 cwd: If not None, the subprocess's current directory will be changed to
164 |cwd| before it's executed.
172 args, cwd=cwd, shell=shell)
181 def GetCmdStatusOutputAndError(args, cwd=None, shell=False):
187 cwd: If not None, the subprocess's current directory will be changed to
188 |cwd| before it's executed.
195 _ValidateAndLogCommand(args, cwd, shell)
197 shell=shell, cwd=cwd)
245 def GetCmdStatusAndOutputWithTimeout(args, timeout, cwd=None, shell=False,
253 cwd: If not None, the subprocess's current directory will be changed to
254 |cwd| before it's executed.
263 _ValidateAndLogCommand(args, cwd, shell)
265 process = Popen(args, cwd=cwd, shell=shell, stdout=subprocess.PIPE,
281 def IterCmdOutputLines(args, timeout=None, cwd=None, shell=False,
288 cwd: If not None, the subprocess's current directory will be changed to
289 |cwd| before it's executed.
302 cmd = _ValidateAndLogCommand(args, cwd, shell)
303 process = Popen(args, cwd=cwd, shell=shell, stdout=subprocess.PIPE,