Revision: 3651
Author: jussi.ao.malinen
Date: Fri May 28 10:11:20 2010
Log: signal handler tests should not get stuck anymore. hopefully.
http://code.google.com/p/robotframework/source/detail?r=3651

Modified:
 /trunk/atest/robot/running/stopping_with_signal.txt
 /trunk/src/robot/running/signalhandler.py

=======================================
--- /trunk/atest/robot/running/stopping_with_signal.txt Fri May 28 08:06:29 2010 +++ /trunk/atest/robot/running/stopping_with_signal.txt Fri May 28 10:11:20 2010
@@ -76,6 +76,10 @@
Run Keyword if ${is_jython_in_use} Start Running jybot ${test signal file} running/stopping_with_signal/${testcase file} ${teardown sleep}
     Wait Until Created  ${TEMPDIR}/${test signal file}  1 minutes
     Run Keyword  ${signal method}  ${signal}
+    Wait Until Finished With Timeout
+
+Wait Until Finished With Timeout
+    [timeout]  1 minute
     wait until finished

 Start Running Robot
=======================================
--- /trunk/src/robot/running/signalhandler.py   Thu May  6 00:18:28 2010
+++ /trunk/src/robot/running/signalhandler.py   Fri May 28 10:11:20 2010
@@ -16,7 +16,7 @@
 import sys

 from robot.errors import ExecutionFailed
-
+from robot.output import LOGGER

 class _StopSignalMonitor(object):

@@ -25,8 +25,9 @@
         self._running_keyword = False
         self._error_reported = False

-    def __call__(self,signum, frame):
+    def __call__(self, signum, frame):
         self._signal_count += 1
+        LOGGER.info('Received signal: %s.' % signum)
         if self._signal_count > 1:
             sys.__stderr__.write('Execution forcefully stopped.')
             raise SystemExit()

Reply via email to