3 new revisions:

Revision: ecbbd033b206
Branch:   default
Author:   Pekka Klärck
Date:     Tue Jun 10 14:05:28 2014 UTC
Log: Get File tests: Workaround for Python 2.5 bugs with UTF-8 and error ha...
http://code.google.com/p/robotframework/source/detail?r=ecbbd033b206

Revision: 2e1d2657fffe
Branch:   default
Author:   Pekka Klärck
Date:     Tue Jun 10 14:18:35 2014 UTC
Log: Process tests: Workaround for Python 2.5 adding null bytes when using ...
http://code.google.com/p/robotframework/source/detail?r=2e1d2657fffe

Revision: 956cfd590004
Branch:   default
Author:   Pekka Klärck
Date:     Tue Jun 10 14:32:25 2014 UTC
Log: Process: Made tests on Windows requiring Py 2.7 features non-critical ...
http://code.google.com/p/robotframework/source/detail?r=956cfd590004

==============================================================================
Revision: ecbbd033b206
Branch:   default
Author:   Pekka Klärck
Date:     Tue Jun 10 14:05:28 2014 UTC
Log: Get File tests: Workaround for Python 2.5 bugs with UTF-8 and error handlers
http://code.google.com/p/robotframework/source/detail?r=ecbbd033b206

Modified:
 /atest/testdata/standard_libraries/operating_system/get_file.txt

=======================================
--- /atest/testdata/standard_libraries/operating_system/get_file.txt Tue Apr 29 17:09:17 2014 UTC +++ /atest/testdata/standard_libraries/operating_system/get_file.txt Tue Jun 10 14:05:28 2014 UTC
@@ -139,17 +139,17 @@

 Verify Get File with error handler
     [Arguments]    ${file}    ${error handler}    ${expected}
-    ${ret}=    Get File    ${file}    encoding_errors=${error handler}
+ ${ret}= Get File ${file} ASCII encoding_errors=${error handler}
     Should Be Equal    ${ret}    ${expected}

 Verify Grep File with error handler
     [Arguments]    ${error handler}    ${expected}
- ${ret}= Grep File ${LATIN-1 LONG FILE} f*a encoding_errors=${error handler} + ${ret}= Grep File ${LATIN-1 LONG FILE} f*a ASCII encoding_errors=${error handler}
     Should Be Equal    ${ret}    ${expected}

 Verify Log File with error handler
     [Arguments]    ${error handler}    ${expected}
- ${ret}= Log File ${LATIN-1 FILE} encoding_errors=${error handler} + ${ret}= Log File ${LATIN-1 FILE} ASCII encoding_errors=${error handler}
     Should Be Equal    ${ret}    ${expected}

 Verify Grep File With UTF-16 files

==============================================================================
Revision: 2e1d2657fffe
Branch:   default
Author:   Pekka Klärck
Date:     Tue Jun 10 14:18:35 2014 UTC
Log: Process tests: Workaround for Python 2.5 adding null bytes when using Popen.communicate
http://code.google.com/p/robotframework/source/detail?r=2e1d2657fffe

Modified:
 /atest/testdata/standard_libraries/process/resource.txt
 /atest/testdata/standard_libraries/process/stdout_and_stderr.txt

=======================================
--- /atest/testdata/standard_libraries/process/resource.txt Tue Jun 10 12:14:45 2014 UTC +++ /atest/testdata/standard_libraries/process/resource.txt Tue Jun 10 14:18:35 2014 UTC
@@ -11,8 +11,8 @@

 *** Keywords ***
 Some process
-    [Arguments]    ${alias}=${null}
- ${handle}= Start Python Process print raw_input() alias=${alias} stderr=STDOUT
+    [Arguments]    ${alias}=${null}    ${stderr}=STDOUT
+ ${handle}= Start Python Process print raw_input() alias=${alias} stderr=${stderr}
     Process should be running
     [Return]    ${handle}

@@ -22,7 +22,8 @@
     Return From Keyword If    not ${running}
     ${process}=    Get Process Object    ${handle}
${stdout} ${_} = Call Method ${process} communicate ${message}\n
-    [Return]    ${stdout.rstrip()}
+    # Python 2.5 adds null bytes
+    [Return]    ${stdout.replace('\x00', '').rstrip()}

 Result should equal
     [Arguments]    ${result}    ${stdout}=    ${stderr}=    ${rc}=0
=======================================
--- /atest/testdata/standard_libraries/process/stdout_and_stderr.txt Tue Jun 10 12:14:45 2014 UTC +++ /atest/testdata/standard_libraries/process/stdout_and_stderr.txt Tue Jun 10 14:18:35 2014 UTC
@@ -62,21 +62,16 @@
     \   Run And Test Once    ${i}    ${STDOUT}    ${STDERR}

 Read standard streams when they are already closed externally
-    ${code} =    Catenate    SEPARATOR=;
-    ...    import sys
-    ...    message = raw_input()
-    ...    sys.stdout.write('%s out' % message)
-    ...    sys.stderr.write('%s err' % message)
-    Start Python Process    ${code}
+    Some Process    stderr=${NONE}
+    ${stdout} =    Stop Some Process    message=hello
+    Should Be Equal    ${stdout}    hello
     ${process} =    Get Process Object
- ${stdout} ${stderr} = Call Method ${process} communicate hi\n
-    Should Be Equal    ${stdout}--${stderr}    hi out--hi err
     Run Keyword If    not ${process.stdout.closed}
     ...    Call Method    ${process.stdout}    close
     Run Keyword If    not ${process.stderr.closed}
     ...    Call Method    ${process.stderr}    close
     ${result} =    Wait For Process
-    Should Be Equal    ${result.stdout}--${result.stderr}    --
+    Should Be Empty    ${result.stdout}${result.stderr}

 *** Keywords ***
 Run Stdout Stderr Process

==============================================================================
Revision: 956cfd590004
Branch:   default
Author:   Pekka Klärck
Date:     Tue Jun 10 14:32:25 2014 UTC
Log: Process: Made tests on Windows requiring Py 2.7 features non-critical with earlier versions.
http://code.google.com/p/robotframework/source/detail?r=956cfd590004

Modified:
 /atest/robot/standard_libraries/process/terminate_process.txt
 /atest/testdata/standard_libraries/process/resource.txt
 /atest/testdata/standard_libraries/process/terminate_process.txt

=======================================
--- /atest/robot/standard_libraries/process/terminate_process.txt Thu Mar 6 22:21:50 2014 UTC +++ /atest/robot/standard_libraries/process/terminate_process.txt Tue Jun 10 14:32:25 2014 UTC
@@ -27,9 +27,9 @@

 Kill process when terminate fails
     ${tc} =    Check Test Case    ${TESTNAME}
- Check Log Message ${tc.kws[5].msgs[0]} Gracefully terminating process. - Check Log Message ${tc.kws[5].msgs[1]} Graceful termination failed. - Check Log Message ${tc.kws[5].msgs[2]} Forcefully killing process. + Check Log Message ${tc.kws[6].msgs[0]} Gracefully terminating process. + Check Log Message ${tc.kws[6].msgs[1]} Graceful termination failed. + Check Log Message ${tc.kws[6].msgs[2]} Forcefully killing process.
     Should Be True    ${tc.elapsedtime} >= 2000

 Terminating already terminated process is ok
=======================================
--- /atest/testdata/standard_libraries/process/resource.txt Tue Jun 10 14:18:35 2014 UTC +++ /atest/testdata/standard_libraries/process/resource.txt Tue Jun 10 14:32:25 2014 UTC
@@ -77,7 +77,7 @@

 Check Precondition
     [Arguments]    ${precondition}
-    ${ok} =    Evaluate    ${precondition}    modules=sys,os
+    ${ok} =    Evaluate    ${precondition}    modules=sys,os,signal
     Run Keyword If    not ${ok}
... Fail Precondition '${precondition}' was not true. precondition-fail

=======================================
--- /atest/testdata/standard_libraries/process/terminate_process.txt Mon Mar 10 09:24:39 2014 UTC +++ /atest/testdata/standard_libraries/process/terminate_process.txt Tue Jun 10 14:32:25 2014 UTC
@@ -27,6 +27,7 @@
     Should Be Empty    ${result.stderr}

 Terminate process running on shell
+ Check Precondition os.sep == '/' or hasattr(signal, 'CTRL_BREAK_EVENT')
     Start Process    python    ${COUNTDOWN}    ${TEMPFILE}    shell=True
     Terminate should stop countdown

@@ -36,6 +37,7 @@
     Terminate should stop countdown    kill=yes

 Also child processes are terminated
+ Check Precondition os.sep == '/' or hasattr(signal, 'CTRL_BREAK_EVENT')
     Start Process    python    ${COUNTDOWN}    ${TEMPFILE}    3
     Terminate should stop countdown

@@ -45,6 +47,7 @@
     Terminate should stop countdown    kill=${True}

 Kill process when terminate fails
+ Check Precondition os.sep == '/' or hasattr(signal, 'CTRL_BREAK_EVENT')
     ${lib} =    Get Library Instance    Process
     ${lib.TERMINATE_TIMEOUT} =    Set Variable    ${2}
     ${lib.KILL_TIMEOUT} =    Set Variable    ${1}

--

--- 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/d/optout.

Reply via email to