2 new revisions:
Revision: 859d02e67393
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 03:20:21 2013
Log: Process: resolved some doc todos
http://code.google.com/p/robotframework/source/detail?r=859d02e67393
Revision: b98a1d569be9
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 03:20:28 2013
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=b98a1d569be9
==============================================================================
Revision: 859d02e67393
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 03:20:21 2013
Log: Process: resolved some doc todos
http://code.google.com/p/robotframework/source/detail?r=859d02e67393
Modified:
/src/robot/libraries/Process.py
=======================================
--- /src/robot/libraries/Process.py Tue Jun 11 01:46:24 2013
+++ /src/robot/libraries/Process.py Tue Jun 11 03:20:21 2013
@@ -113,8 +113,12 @@
as the parent process, the process running tests, is executed. This
can be changed by giving an alternative location using the `cwd`
argument.
+ `Standard output and error streams`, when redirected to files,
+ are also relative to the current working directory possibly set using
+ the `cwd` argument.
+
Example:
- | `Run Process` | prog.exe | cwd=c:\\\\temp |
+ | `Run Process` | prog.exe | cwd=c:\\\\temp | stdout=stdout.txt |
== Environment variables ==
@@ -141,6 +145,8 @@
and `stderr` arguments to specify files on the file system where to
redirect the outputs. This can also be useful if other processes or
other keywords need to read or manipulate the outputs somehow.
+ Given `stdout` and `stderr` paths are relative to the `current working
+ directory`.
As a special feature, it is possible to redirect the standard error to
the standard output by using `stderr=STDOUT`.
@@ -154,11 +160,6 @@
| ${result} = | `Run Process` | program | stderr=STDOUT |
| `Log` | all output: ${result.stdout} |
- TODO:
- - Document issues with Jython/Ipy.
- - Document are stdout/stderr files relative to the cwd or what.
- - Replace / with \ in stdout/stderr paths on Windows? Also in command?
-
== Alias ==
A custom name given to the process that can be used when selecting the
@@ -519,15 +520,13 @@
def __init__(self, cwd=None, shell=False, stdout=None, stderr=None,
alias=None, env=None, **rest):
self.cwd = cwd or os.path.abspath(os.curdir)
- self.stdout_stream = self._new_stream(stdout, 'stdout')
+ self.stdout_stream = self._new_stream(stdout)
self.stderr_stream = self._get_stderr(stderr, stdout)
self.shell = bool(shell)
self.alias = alias
self.env = self._construct_env(env, rest)
- def _new_stream(self, name, postfix):
- if name == 'PIPE':
- return subprocess.PIPE
+ def _new_stream(self, name):
if name:
return open(os.path.join(self.cwd, name), 'w')
return subprocess.PIPE
@@ -538,7 +537,7 @@
if self.stdout_stream == subprocess.PIPE:
return subprocess.STDOUT
return self.stdout_stream
- return self._new_stream(stderr, 'stderr')
+ return self._new_stream(stderr)
def _construct_env(self, env, rest):
for key in rest:
@@ -560,4 +559,4 @@
shell = %r
alias = %s
env = %r""" % (self.cwd, self.stdout_stream, self.stderr_stream,
- self.shell, self.alias, self.env))
+ self.shell, self.alias, self.env))
==============================================================================
Revision: b98a1d569be9
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 03:20:28 2013
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=b98a1d569be9
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.