3 new revisions:
Revision: 56630be523e1
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 04:18:12 2013
Log: Process: removed test of functionality that was already removed
and th...
http://code.google.com/p/robotframework/source/detail?r=56630be523e1
Revision: db3e179b650f
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 04:29:42 2013
Log: Process: Removed support for stopping process w/ Python 2.5.
Cleaned u...
http://code.google.com/p/robotframework/source/detail?r=db3e179b650f
Revision: 70f309b23dfb
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 04:29:48 2013
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=70f309b23dfb
==============================================================================
Revision: 56630be523e1
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 04:18:12 2013
Log: Process: removed test of functionality that was already removed
and that these tests didn't really test either.
http://code.google.com/p/robotframework/source/detail?r=56630be523e1
Modified:
/atest/robot/standard_libraries/process/process_library.txt
/atest/testdata/standard_libraries/process/process_library.txt
=======================================
--- /atest/robot/standard_libraries/process/process_library.txt Mon Jun 10
23:07:35 2013
+++ /atest/robot/standard_libraries/process/process_library.txt Tue Jun 11
04:18:12 2013
@@ -73,12 +73,6 @@
Current working directory should not be used with stdout and stderr when
absolute path in use
Check Test Case ${TESTNAME}
-
-Piped stdout
- Check Test Case ${TESTNAME}
-
-Piped stderr
- Check Test Case ${TESTNAME}
*** Keywords ***
Check Preconditions
=======================================
--- /atest/testdata/standard_libraries/process/process_library.txt Tue Jun
11 04:06:55 2013
+++ /atest/testdata/standard_libraries/process/process_library.txt Tue Jun
11 04:18:12 2013
@@ -159,15 +159,6 @@
[Teardown] Run Keywords
... Remove Directory %{TEMPDIR}${/}hc recursive=True AND
... Remove File ${stdout_path}
-
-Piped stdout
- ${result}= Run Process python -c print 'hello'
stdout=PIPE
- Should Match ${result.stdout} *hello*
-
-Piped stderr
- ${result}= Run Process python -c 1/0 stderr=PIPE
- Should Match ${result.stderr} *ZeroDivisionError*
-
*** Keywords ***
Restart Suite Process If Needed
==============================================================================
Revision: db3e179b650f
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 04:29:42 2013
Log: Process: Removed support for stopping process w/ Python 2.5.
Cleaned up stopping in general.
http://code.google.com/p/robotframework/source/detail?r=db3e179b650f
Modified:
/src/robot/libraries/Process.py
=======================================
--- /src/robot/libraries/Process.py Tue Jun 11 04:06:55 2013
+++ /src/robot/libraries/Process.py Tue Jun 11 04:29:42 2013
@@ -370,43 +370,18 @@
See `Stopping process` for more details.
"""
process = self._process(handle)
-
- # TODO: Is pre 2.6 support needed? If yes, and it works, docs need
to be changed.
- # This should be enough to check if we are dealing with <2.6 Python
- if not hasattr(process, 'kill'):
- self._terminate_process(process)
- return
try:
- if kill:
- logger.info('calling subprocess.Popen.kill()')
- process.kill()
- else:
- logger.info('calling subprocess.Popen.terminate()')
- process.terminate()
+ terminator = process.kill if kill else process.terminate
+ except AttributeError:
+ raise RuntimeError('Terminating processes is not supported '
+ 'by this interpreter version.')
+ logger.info('Killing process.' if kill else 'Terminating process.')
+ try:
+ terminator()
except OSError:
- logger.debug('OSError during process termination')
if process.poll() is None:
- logger.debug('Process still alive raising exception')
raise
- logger.debug('Process is not executing - consuming OSError')
-
- def _terminate_process(self, theprocess):
- if sys.platform == 'win32':
- logger.info('terminating process using ctypes.windll.kernel32')
- import ctypes
- PROCESS_TERMINATE = 1
- handle = ctypes.windll.kernel32.OpenProcess(PROCESS_TERMINATE,
- False,
- theprocess.pid)
- ctypes.windll.kernel32.TerminateProcess(handle, -1)
- ctypes.windll.kernel32.CloseHandle(handle)
- else:
- pid = theprocess.pid
- if pid is not None:
- logger.info('terminating process using os.kill')
- os.kill(pid, signal.SIGKILL)
- else:
- raise AssertionError('None Pid - can not kill process!')
+ logger.debug('Ignored OSError because process was stopped.')
def terminate_all_processes(self, kill=True):
"""Terminates all still running processes started by this library.
==============================================================================
Revision: 70f309b23dfb
Branch: default
Author: Robot Framework Developers (robotframew...@gmail.com)
Date: Tue Jun 11 04:29:48 2013
Log: Automated merge with https://robotframework.googlecode.com/hg/
http://code.google.com/p/robotframework/source/detail?r=70f309b23dfb
Modified:
/atest/testdata/standard_libraries/process/process_library.txt
=======================================
--- /atest/testdata/standard_libraries/process/process_library.txt Tue Jun
11 04:28:34 2013
+++ /atest/testdata/standard_libraries/process/process_library.txt Tue Jun
11 04:29:48 2013
@@ -159,15 +159,6 @@
[Teardown] Run Keywords
... Remove Directory %{TEMPDIR}${/}hc recursive=True AND
... Remove File ${stdout_path}
-
-Piped stdout
- ${result}= Run Process python -c print 'hello'
stdout=PIPE
- Should Match ${result.stdout} *hello*
-
-Piped stderr
- ${result}= Run Process python -c 1/0 stderr=PIPE
- Should Match ${result.stderr} *ZeroDivisionError*
-
*** Keywords ***
Restart Suite Process If Needed
--
---
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.