Revision: de9578469390
Branch: default
Author: Robot Framework Developers ([email protected])
Date: Tue May 28 04:50:04 2013
Log: new run: support for dry-run
http://code.google.com/p/robotframework/source/detail?r=de9578469390
Modified:
/src/robot/conf/settings.py
/src/robot/new_running/model.py
/src/robot/new_running/runner.py
/src/robot/running/userkeyword.py
=======================================
--- /src/robot/conf/settings.py Mon May 27 04:52:25 2013
+++ /src/robot/conf/settings.py Tue May 28 04:50:04 2013
@@ -341,6 +341,10 @@
def randomize_tests(self):
return any(mode in ('RANDOM:TEST', 'RANDOM:ALL') for mode in
self['RunMode'])
+ @property
+ def dry_run(self):
+ return any(mode == 'DRYRUN' for mode in self['RunMode'])
+
class RebotSettings(_BaseSettings):
_extra_cli_opts = {'Output' : ('output', 'NONE'),
=======================================
--- /src/robot/new_running/model.py Mon May 27 13:40:51 2013
+++ /src/robot/new_running/model.py Tue May 28 04:50:04 2013
@@ -134,7 +134,7 @@
stderr=settings['StdErr'])
init_global_variables(settings)
output = Output(settings)
- runner = Runner(output)
+ runner = Runner(output, settings)
self.visit(runner)
output.close(runner.result.suite)
return runner.result
=======================================
--- /src/robot/new_running/runner.py Mon May 27 13:40:51 2013
+++ /src/robot/new_running/runner.py Tue May 28 04:50:04 2013
@@ -29,9 +29,10 @@
class Runner(SuiteVisitor):
- def __init__(self, output):
+ def __init__(self, output, settings):
self.result = None
self._output = output
+ self._settings = settings
self._suite = None
self._suite_status = None
self._executed_tests = None
@@ -51,7 +52,7 @@
self._context.namespace.variables if self._context
else None,
UserLibrary(suite.user_keywords),
variables)
- EXECUTION_CONTEXTS.start_suite(ns, self._output, False)
+ EXECUTION_CONTEXTS.start_suite(ns, self._output,
self._settings.dry_run)
ns.handle_imports()
variables.resolve_delayed()
result = TestSuite(name=suite.name,
=======================================
--- /src/robot/running/userkeyword.py Tue May 28 01:20:36 2013
+++ /src/robot/running/userkeyword.py Tue May 28 04:50:04 2013
@@ -155,7 +155,7 @@
def _resolve_dry_run_args(self, arguments):
ArgumentValidator(self.arguments).validate_dry_run(arguments)
missing_args = len(self.arguments.positional) - len(arguments)
- return arguments + [None] * missing_args
+ return tuple(arguments) + (None,) * missing_args
def _normal_run(self, context, variables, arguments):
arguments = self._resolve_arguments(arguments, variables)
--
---
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.