2 new revisions:

Revision: 872bf417db3c
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Thu May 30 05:22:00 2013
Log:      Arguments: unknown arguments are not validated in running anymore
http://code.google.com/p/robotframework/source/detail?r=872bf417db3c

Revision: 59702193fe27
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Thu May 30 05:22:25 2013
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=59702193fe27

==============================================================================
Revision: 872bf417db3c
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Thu May 30 05:22:00 2013
Log:      Arguments: unknown arguments are not validated in running anymore
http://code.google.com/p/robotframework/source/detail?r=872bf417db3c

Modified:
 /atest/robot/cli/rebot/invalid_usage.txt
 /atest/robot/cli/runner/multisource.txt
 /src/robot/run.py

=======================================
--- /atest/robot/cli/rebot/invalid_usage.txt    Thu Aug 30 03:53:56 2012
+++ /atest/robot/cli/rebot/invalid_usage.txt    Thu May 30 05:22:00 2013
@@ -16,17 +16,16 @@
Rebot should fail nönéx.xml Reading XML source 'nönéx\\.xml' failed: .*

 Non-Existing Input And Existing Input
-    Run Rebot  ${EMPTY}  nönex  ${MYINPUT}
+    Run Rebot Without Processing Output    ${EMPTY}    nönex    ${MYINPUT}
     ${nönex} =  Normalize Path  ${DATADIR}/nönex
- Check Stderr Contains [ WARN ] Argument '${nönex}' did not exist and was ignored. Validate the used command line syntax
-    Check Names  ${SUITE}  Normal
-    Should Contain Tests  ${SUITE}  First One  Second One
+ Check Stderr Contains [ ERROR ] Reading XML source '${nönex}' failed: No such file or directory
+    File Should Not Exist    ${OUTDIR}${/}output.xml

 Only Non-Existing Inputs
     Run Rebot Without Processing Output  ${EMPTY}  nönex1  nönex2
     ${nönex} =  Normalize Path  ${DATADIR}/nönex
- Check Stderr Contains [ WARN ] Arguments '${nönex}1' and '${nönex}2' did not exist and were ignored. Validate the used command line syntax
-    Check Stderr Contains  [ ERROR ] No valid arguments given.
+ Check Stderr Contains [ ERROR ] Reading XML source '${nönex}1' failed: No such file or directory
+    File Should Not Exist    ${OUTDIR}${/}output.xml

 Non-XML Input
     Create File  ${MYOUTDIR}/invalid.txt  Hello, world
=======================================
--- /atest/robot/cli/runner/multisource.txt     Thu Aug 30 03:53:56 2012
+++ /atest/robot/cli/runner/multisource.txt     Thu May 30 05:22:00 2013
@@ -47,15 +47,13 @@
     Should Contain Tests  ${SUITE.suites[2]}   Suite3 First
Check Names ${SUITE.suites[2].tests[0]} Suite3 First Tsuite1 & Tsuite2 & Tsuite3.Tsuite3.

-Warning When Parsing Any Data Source Fails
-    Run Tests  ${EMPTY}  nönex  misc/pass_and_fail.txt
-    ${nönex} =  Normalize Path  ${DATADIR}/nönex
- Check Log Message ${ERRORS.msgs[0]} Argument '${nönex}' did not exist and was ignored. Validate the used command line syntax. WARN
-    Check Names  ${SUITE}  Pass And Fail
-    Should Contain Tests  ${SUITE}  Pass  Fail
+Failure When Parsing Any Data Source Fails
+ Run Tests Without Processing Output ${EMPTY} nönex misc/pass_and_fail.txt
+    ${nönex} =    Normalize Path    ${DATADIR}/nönex
+ Check Stderr Contains [ ERROR ] Parsing '${nönex}' failed: Data source does not exist.
+    File Should Not Exist    ${OUTDIR}${/}output.xml

 Warnings And Error When Parsing All Data Sources Fail
     Run Tests Without Processing Output  ${EMPTY}  nönex1  nönex2
     ${nönex} =  Normalize Path  ${DATADIR}/nönex
- Check Stderr Contains [ WARN ] Arguments '${nönex}1' and '${nönex}2' did not exist and were ignored. Validate the used command line syntax.
-    Check Stderr Contains  [ ERROR ] No valid arguments given.
+ Check Stderr Contains [ ERROR ] Parsing '${nönex}1' failed: Data source does not exist.
=======================================
--- /src/robot/run.py   Thu May 30 02:27:45 2013
+++ /src/robot/run.py   Thu May 30 05:22:00 2013
@@ -403,25 +403,6 @@
             writer.write_results(settings.get_rebot_settings())
         return result.return_code

-    def validate(self, options, arguments):
-        if len(arguments) > 1:
-            arguments = self._validate_arguments_exist(arguments)
-        return options, arguments
-
-    def _validate_arguments_exist(self, arguments):
-        valid = []
-        nonex = []
-        for arg in arguments:
-            (valid if os.path.exists(arg) else nonex).append(arg)
-        if nonex:
-            s, were = ('s', 'were') if len(nonex) > 1 else ('', 'was')
-            LOGGER.warn("Argument%s %s did not exist and %s ignored. "
-                        "Validate the used command line syntax."
-                        % (s, seq2str(nonex), were))
-            if not valid:
-                raise DataError('No valid arguments given.')
-        return valid
-

 def run_cli(arguments):
     """Command line execution entry point for running tests.

==============================================================================
Revision: 59702193fe27
Branch:   default
Author:   Tatu Kairi <[email protected]>
Date:     Thu May 30 05:22:25 2013
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=59702193fe27

Deleted:
 /atest/robot/running/deprecated_runmode/invalid_runmode.txt

=======================================
--- /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'.

--

--- 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.


Reply via email to