Revision: e7e59aac7758
Branch: default
Author: Anssi Syrjäsalo
Date: Thu May 30 05:21:03 2013
Log: Log deprecation warning when using --runmode
Update issue 1445
A deprecation warning is now logged with level WARN whenever --runmode is
used.
http://code.google.com/p/robotframework/source/detail?r=e7e59aac7758
Added:
/atest/robot/running/deprecated_runmode/using_runmode.txt
Deleted:
/atest/robot/running/deprecated_runmode/invalid_runmode.txt
Modified:
/atest/robot/running/deprecated_runmode/dryrun.txt
/atest/robot/running/deprecated_runmode/exit_on_failure.txt
/src/robot/conf/settings.py
=======================================
--- /dev/null
+++ /atest/robot/running/deprecated_runmode/using_runmode.txt Thu May 30
05:21:03 2013
@@ -0,0 +1,20 @@
+*** Settings ***
+Force Tags regression pybot jybot
+Resource ../../cli/runner/cli_resource.txt
+
+
+*** Test Cases ***
+
+Invalid Runmode
+ ${options} = Set Variable --runmode INVALID ${TESTFILE}
+ ${msg} = Set Variable Option '--runmode' does not support
value 'INVALID'.
+ Set Runners
+ ${rc} ${output} = Run And Return RC and Output ${ROBOT} ${options}
+ Should Be Equal As Integers ${rc} 252
+ Should Contain ${output} [ ERROR ] ${msg}${USAGETIP}
+
+Logs Deprecation Warning
+ ${options} = Set Variable --runmode something ${TESTFILE}
+ ${msg} = Set Variable Option --runmode is deprecated in Robot
Framework 2.8 and will be removed in the future.
+ ${_} ${output} = Run And Return RC and Output ${ROBOT} ${options}
+ Should Contain ${output} [ WARN ] ${msg}
=======================================
--- /atest/robot/running/deprecated_runmode/invalid_runmode.txt Thu May 30
03:59:56 2013
+++ /dev/null
@@ -1,8 +0,0 @@
-*** Settings ***
-Force Tags regression pybot jybot
-Resource ../../cli/runner/cli_resource.txt
-
-
-*** Test Cases ***
-Invalid Runmode
- Run Should Fail --runmode INVALID ${TESTFILE} Option '--runmode'
does not support value 'INVALID'.
=======================================
--- /atest/robot/running/deprecated_runmode/dryrun.txt Wed May 29 06:51:24
2013
+++ /atest/robot/running/deprecated_runmode/dryrun.txt Thu May 30 05:21:03
2013
@@ -84,7 +84,7 @@
Invalid syntax in UK
Check Test Case ${TESTNAME}
- Check Log Message ${ERRORS[0]} Creating user keyword 'Invalid Syntax
UK' failed: Invalid argument '${arg'. ERROR
+ Check Log Message ${ERRORS[1]} Creating user keyword 'Invalid Syntax
UK' failed: Invalid argument '${arg'. ERROR
Multiple Failures
Check Test Case ${TESTNAME}
=======================================
--- /atest/robot/running/deprecated_runmode/exit_on_failure.txt Wed May 29
06:51:24 2013
+++ /atest/robot/running/deprecated_runmode/exit_on_failure.txt Thu May 30
05:21:03 2013
@@ -12,7 +12,7 @@
Imports Are Skipped On Exit
Previous test should have passed Exit On Failure
- Should be empty ${ERRORS.messages}
+ Length Should Be ${ERRORS.msgs} 1
Correct Suite Teardown Is Executed When Exitonfailure Is Used
[Setup] Run Tests --runmode exitonfailure misc/suites
=======================================
--- /src/robot/conf/settings.py Thu May 30 04:00:03 2013
+++ /src/robot/conf/settings.py Thu May 30 05:21:03 2013
@@ -113,6 +113,8 @@
if name == 'RemoveKeywords':
return [v.upper() for v in value]
if name == 'RunMode':
+ LOGGER.warn('Option --runmode is deprecated in Robot Framework
2.8 '
+ 'and will be removed in the future.')
return [self._process_runmode_value(v) for v in value]
return value
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.