Home | History | Annotate | Download | only in utils

Lines Matching refs:cwd

91 def Popen(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
101 args=args, cwd=cwd, stdout=stdout, stderr=stderr,
105 def Call(args, stdout=None, stderr=None, shell=None, cwd=None, env=None):
106 pipe = Popen(args, stdout=stdout, stderr=stderr, shell=shell, cwd=cwd,
112 def RunCmd(args, cwd=None):
118 cwd: If not None, the subprocess's current directory will be changed to
119 |cwd| before it's executed.
124 logger.info(str(args) + ' ' + (cwd or ''))
125 return Call(args, cwd=cwd)
128 def GetCmdOutput(args, cwd=None, shell=False, env=None):
134 cwd: If not None, the subprocess's current directory will be changed to
135 |cwd| before it's executed.
144 (_, output) = GetCmdStatusAndOutput(args, cwd, shell, env)
148 def _ValidateAndLogCommand(args, cwd, shell):
156 if cwd is None:
157 cwd = ''
159 cwd = ':' + cwd
160 logger.info('[host]%s> %s', cwd, args)
164 def GetCmdStatusAndOutput(args, cwd=None, shell=False, env=None):
170 cwd: If not None, the subprocess's current directory will be changed to
171 |cwd| before it's executed.
181 args, cwd=cwd, shell=shell, env=env)
190 def GetCmdStatusOutputAndError(args, cwd=None, shell=False, env=None):
196 cwd: If not None, the subprocess's current directory will be changed to
197 |cwd| before it's executed.
206 _ValidateAndLogCommand(args, cwd, shell)
208 shell=shell, cwd=cwd, env=env)
365 def GetCmdStatusAndOutputWithTimeout(args, timeout, cwd=None, shell=False,
373 cwd: If not None, the subprocess's current directory will be changed to
374 |cwd| before it's executed.
387 _ValidateAndLogCommand(args, cwd, shell)
389 process = Popen(args, cwd=cwd, shell=shell, stdout=subprocess.PIPE,
405 def IterCmdOutputLines(args, iter_timeout=None, timeout=None, cwd=None,
414 cwd: If not None, the subprocess's current directory will be changed to
415 |cwd| before it's executed.
429 cmd = _ValidateAndLogCommand(args, cwd, shell)
430 process = Popen(args, cwd=cwd, shell=shell, env=env,