Revision: 1e2849b71d2d
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 06:39:34 2013
Log:      fixed rc when generating report but not log
http://code.google.com/p/robotframework/source/detail?r=1e2849b71d2d

Modified:
 /atest/robot/cli/runner/status_rc.txt
 /src/robot/run.py

=======================================
--- /atest/robot/cli/runner/status_rc.txt       Mon Jun 18 00:57:01 2012
+++ /atest/robot/cli/runner/status_rc.txt       Thu May 30 06:39:34 2013
@@ -2,6 +2,7 @@
 Suite Setup     Set Runners
 Default Tags    regression  pybot  jybot
 Resource        cli_resource.txt
+Test Template   Run Tests and Verify RC

 *** Variables ***
 ${MISCDIR}   ${CURDIR}/../../../testdata/misc
@@ -11,23 +12,25 @@
 *** Test Cases ***

 Zero RC when all tests pass
-    Run Tests and Verify RC  ${PASSING}                  rc=0
+    ${PASSING}                  rc=0

 Zero RC when all critical tests pass
-    Run Tests and Verify RC  --critical pass ${FAILING}  rc=0
+    --critical pass ${FAILING}  rc=0

 Non-zero RC when critical tests fail
-    Run Tests and Verify RC  ${FAILING}                  rc=1
+    ${FAILING}                  rc=1
+    -r report.html ${FAILING}   rc=1
+    -l log.html ${FAILING}      rc=1

 Zero RC when all tests pass with --NoStatusRC
-    Run Tests and Verify RC  --NoStatusRC ${PASSING}     rc=0
+    --NoStatusRC ${PASSING}     rc=0

 Zero RC when critical tests fail with --NoStatusRC
-    Run Tests and Verify RC  --nostatusrc ${FAILING}     rc=0
+    --nostatusrc ${FAILING}     rc=0


 *** Keywords ***
 Run Tests and Verify RC
-    [Arguments]  ${options & source}  ${rc}=
- ${returned}= Run And Return Rc ${ROBOT} --output NONE ${options & source}
-    Should Be Equal As Integers  ${returned}  ${rc}
+    [Arguments]    ${options & source}    ${rc}=
+ ${returned}= Run And Return Rc ${ROBOT} -o NONE -l NONE -r NONE ${options & source}
+    Should Be Equal As Integers    ${returned}    ${rc}
=======================================
--- /src/robot/run.py   Thu May 30 06:02:18 2013
+++ /src/robot/run.py   Thu May 30 06:39:34 2013
@@ -399,10 +399,11 @@
                          stat_config=settings.statistics_config)
         LOGGER.info("Tests execution ended. Statistics:\n%s"
                     % result.suite.statistics.message)
+        rc = result.return_code
         if settings.log or settings.report or settings.xunit:
writer = ResultWriter(settings.output if settings.log else result)
             writer.write_results(settings.get_rebot_settings())
-        return result.return_code
+        return rc


 def run_cli(arguments):

--

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