3 new revisions:
Revision: e2a53f086fca
Branch: default
Author: Pekka Klärck
Date: Wed May 29 09:53:37 2013
Log: added seemingly important 'import os' back to BuiltIn. need to
check w...
http://code.google.com/p/robotframework/source/detail?r=e2a53f086fca
Revision: 281b72229b30
Branch: default
Author: Pekka Klärck
Date: Wed May 29 09:54:44 2013
Log: fixed setting automatic suite variables
http://code.google.com/p/robotframework/source/detail?r=281b72229b30
Revision: 43e0a2f3a95f
Branch: default
Author: Pekka Klärck
Date: Wed May 29 09:54:49 2013
Log: Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=43e0a2f3a95f
==============================================================================
Revision: e2a53f086fca
Branch: default
Author: Pekka Klärck
Date: Wed May 29 09:53:37 2013
Log: added seemingly important 'import os' back to BuiltIn. need to
check why it is needed.
http://code.google.com/p/robotframework/source/detail?r=e2a53f086fca
Modified:
/src/robot/libraries/BuiltIn.py
=======================================
--- /src/robot/libraries/BuiltIn.py Wed May 29 08:42:16 2013
+++ /src/robot/libraries/BuiltIn.py Wed May 29 09:53:37 2013
@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import os # FIXME: This seems to be used by Evaluate!!!!
import re
import time
==============================================================================
Revision: 281b72229b30
Branch: default
Author: Pekka Klärck
Date: Wed May 29 09:54:44 2013
Log: fixed setting automatic suite variables
http://code.google.com/p/robotframework/source/detail?r=281b72229b30
Modified:
/src/robot/new_running/runner.py
/src/robot/running/context.py
/src/robot/running/namespace.py
=======================================
--- /src/robot/new_running/runner.py Wed May 29 07:46:41 2013
+++ /src/robot/new_running/runner.py Wed May 29 09:54:44 2013
@@ -76,6 +76,7 @@
self._settings.exit_on_failure,
self._settings.skip_teardown_on_exit)
self._output.start_suite(self._suite)
+ self._context.set_suite_variables(result)
self._run_setup(suite.keywords.setup, self._suite_status)
self._executed_tests = utils.NormalizedDict(ignore='_')
=======================================
--- /src/robot/running/context.py Wed May 29 07:18:32 2013
+++ /src/robot/running/context.py Wed May 29 09:54:44 2013
@@ -81,17 +81,22 @@
test = self.namespace.test
return test and test.status != 'RUNNING'
+ @property
+ def variables(self):
+ return self.namespace.variables
+
+ # TODO: Remove
+ def get_current_vars(self):
+ return self.variables
+
def start_keyword_teardown(self, error):
- self.namespace.variables['${KEYWORD_STATUS}'] = 'FAIL' if error
else 'PASS'
- self.namespace.variables['${KEYWORD_MESSAGE}'] = unicode(error
or '')
+ self.variables['${KEYWORD_STATUS}'] = 'FAIL' if error else 'PASS'
+ self.variables['${KEYWORD_MESSAGE}'] = unicode(error or '')
self._in_keyword_teardown += 1
def end_keyword_teardown(self):
self._in_keyword_teardown -= 1
- def get_current_vars(self):
- return self.namespace.variables
-
def end_test(self, test):
self.output.end_test(test)
self.namespace.end_test()
@@ -106,27 +111,26 @@
def replace_vars_from_setting(self, name, value, errors):
return self.namespace.variables.replace_meta(name, value, errors)
+ def set_suite_variables(self, suite):
+ self.variables['${SUITE_NAME}'] = suite.longname
+ self.variables['${SUITE_SOURCE}'] = suite.source
+ self.variables['${SUITE_DOCUMENTATION}'] = suite.doc
+ self.variables['${SUITE_METADATA}'] = suite.metadata.copy()
+
def set_prev_test_variables(self, test):
- self._set_prev_test_variables(self.get_current_vars(), test.name,
- test.status, test.message)
+ self.variables['${PREV_TEST_NAME}'] = test.name
+ self.variables['${PREV_TEST_STATUS}'] = test.status
+ self.variables['${PREV_TEST_MESSAGE}'] = test.message
def copy_prev_test_vars_to_global(self):
- varz = self.get_current_vars()
- name, status, message = varz['${PREV_TEST_NAME}'], \
- varz['${PREV_TEST_STATUS}'],
varz['${PREV_TEST_MESSAGE}']
- self._set_prev_test_variables(GLOBAL_VARIABLES, name, status,
message)
-
- def _set_prev_test_variables(self, destination, name, status, message):
- destination['${PREV_TEST_NAME}'] = name
- destination['${PREV_TEST_STATUS}'] = status
- destination['${PREV_TEST_MESSAGE}'] = message
-
- def _set_global_variable(self, name, value):
- self.namespace.variables.set_global(name, value)
+ for var in ['${PREV_TEST_NAME}',
+ '${PREV_TEST_STATUS}',
+ '${PREV_TEST_MESSAGE}']:
+ GLOBAL_VARIABLES[var] = self.variables[var]
def report_suite_status(self, status, message):
- self.get_current_vars()['${SUITE_STATUS}'] = status
- self.get_current_vars()['${SUITE_MESSAGE}'] = message
+ self.variables['${SUITE_STATUS}'] = status
+ self.variables['${SUITE_MESSAGE}'] = message
def start_test(self, test):
self.namespace.start_test(test)
=======================================
--- /src/robot/running/namespace.py Wed May 29 07:18:32 2013
+++ /src/robot/running/namespace.py Wed May 29 09:54:44 2013
@@ -71,12 +71,7 @@
def _create_variables(self, suite, parent_vars, suite_variables=None):
if suite_variables is None:
suite_variables = suite.variables
- variables = _VariableScopes(suite_variables, parent_vars)
- variables['${SUITE_NAME}'] = suite.longname
- variables['${SUITE_SOURCE}'] = suite.source
- variables['${SUITE_DOCUMENTATION}'] = suite.doc
- variables['${SUITE_METADATA}'] = suite.metadata.copy()
- return variables
+ return _VariableScopes(suite_variables, parent_vars)
def _import_default_libraries(self):
for name in self._default_libraries:
==============================================================================
Revision: 43e0a2f3a95f
Branch: default
Author: Pekka Klärck
Date: Wed May 29 09:54:49 2013
Log: Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=43e0a2f3a95f
--
---
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.