2 new revisions:
Revision: d832270ce6c2
Branch: default
Author: Pekka Klärck
Date: Mon Jun 16 19:52:12 2014 UTC
Log: atests: new generic kw for making tests non-critical, use it to
skip p...
http://code.google.com/p/robotframework/source/detail?r=d832270ce6c2
Revision: fed888e6cbe3
Branch: default
Author: Pekka Klärck
Date: Mon Jun 16 19:59:29 2014 UTC
Log: encoding sniffing: trying to protect against weird failures w/
ipy on ...
http://code.google.com/p/robotframework/source/detail?r=fed888e6cbe3
==============================================================================
Revision: d832270ce6c2
Branch: default
Author: Pekka Klärck
Date: Mon Jun 16 19:52:12 2014 UTC
Log: atests: new generic kw for making tests non-critical, use it to
skip py2.5 unicode failures on ci
http://code.google.com/p/robotframework/source/detail?r=d832270ce6c2
Modified:
/atest/resources/atest_resource.txt
/atest/robot/standard_libraries/operating_system/get_file.txt
=======================================
--- /atest/resources/atest_resource.txt Thu Apr 17 10:07:17 2014 UTC
+++ /atest/resources/atest_resource.txt Mon Jun 16 19:52:12 2014 UTC
@@ -339,3 +339,7 @@
${interpreter} = Get interpreter ${OUTFILE}
${is 25} = is 25 ${interpreter}
Run keyword if ${is 25} ${kw} @{args}
+
+Make test non-critical if
+ [Arguments] ${condition}
+ Run Keyword If ${condition} Remove Tags regression
=======================================
--- /atest/robot/standard_libraries/operating_system/get_file.txt Sat Jun
14 21:16:44 2014 UTC
+++ /atest/robot/standard_libraries/operating_system/get_file.txt Mon Jun
16 19:52:12 2014 UTC
@@ -34,7 +34,7 @@
Check testcase ${TESTNAME}
Get File with 'replace' Error Handler
- Run Keyword If "${IRONPYTHON}" Remove Tags regression
+ Make test non-critical if "${IRONPYTHON}"
Check testcase ${TESTNAME}
Log File
@@ -50,7 +50,7 @@
Check Log Message ${tc.kws[0].kws[0].msgs[1]} Hyv t
Log File with 'replace' Error Handler
- Run Keyword If "${IRONPYTHON}" Remove Tags regression
+ Make test non-critical if "${IRONPYTHON}"
${tc}= Check testcase ${TESTNAME}
Check Log Message ${tc.kws[0].kws[0].msgs[1]} Hyv\ufffd\ufffd
\ufffd\ufffdt\ufffd
@@ -78,11 +78,13 @@
Check Log Message ${tc.kws[1].kws[0].msgs[1]} 0 out of 0 lines
matched
Grep File non Ascii
+ Make test non-critical if "${IRONPYTHON}" or "python25\\python"
in "${PYTHON}"
${tc}= Check testcase ${TESTNAME}
Check Log Message ${tc.kws[0].kws[0].msgs[1]} 1 out of 5 lines
matched
Check Log Message ${tc.kws[1].kws[0].msgs[1]} 1 out of 5 lines
matched
Grep File with UTF-16 files
+ Make test non-critical if "${IRONPYTHON}" or "python25\\python"
in "${PYTHON}"
${tc}= Check testcase ${TESTNAME}
Log ${tc.kws[0].kws[0].msgs}
Check Log Message ${tc.kws[0].kws[0].msgs[1]} 3 out of 4 lines
matched
@@ -91,12 +93,12 @@
Check Log Message ${tc.kws[3].kws[0].msgs[1]} 2 out of 3 lines
matched
Grep File with 'ignore' Error Handler
- Run Keyword If "${IRONPYTHON}" Remove Tags regression
+ Make test non-critical if "${IRONPYTHON}" or "python25\\python"
in "${PYTHON}"
${tc}= Check testcase ${TESTNAME}
Check Log Message ${tc.kws[0].kws[0].msgs[1]} 1 out of 5 lines
matched
Grep File with 'replace' Error Handler
- Run Keyword If "${IRONPYTHON}" Remove Tags regression
+ Make test non-critical if "${IRONPYTHON}" or "python25\\python"
in "${PYTHON}"
${tc}= Check testcase ${TESTNAME}
Check Log Message ${tc.kws[0].kws[0].msgs[1]} 1 out of 5 lines
matched
==============================================================================
Revision: fed888e6cbe3
Branch: default
Author: Pekka Klärck
Date: Mon Jun 16 19:59:29 2014 UTC
Log: encoding sniffing: trying to protect against weird failures w/
ipy on ci
http://code.google.com/p/robotframework/source/detail?r=fed888e6cbe3
Modified:
/src/robot/utils/encodingsniffer.py
=======================================
--- /src/robot/utils/encodingsniffer.py Thu Jan 23 14:00:53 2014 UTC
+++ /src/robot/utils/encodingsniffer.py Mon Jun 16 19:59:29 2014 UTC
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from ctypes import cdll
import sys
import os
@@ -86,21 +87,20 @@
def _get_windows_system_encoding():
- from ctypes import cdll
- return _call_ctypes(cdll.kernel32.GetACP)
+ return _get_code_page('GetACP')
def _get_windows_output_encoding():
- from ctypes import cdll
- return _call_ctypes(cdll.kernel32.GetOEMCP)
+ return _get_code_page('GetOEMCP')
-def _call_ctypes(method):
- method.argtypes = () # needed w/ jython (at least 2.5)
+def _get_code_page(method_name):
try:
- return 'cp%s' % method()
- except Exception: # Has failed on IronPython at least once
+ method = getattr(cdll.kernel32, method_name)
+ except TypeError: # Sometimes occurs w/ IronPython (mainly on CI)
return None
+ method.argtypes = () # Needed w/ Jython (at least 2.5)
+ return 'cp%s' % method()
def _is_valid(encoding):
--
---
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.