Revision: a18841e71e63
Branch: default
Author: Robot Framework Developers ([email protected])
Date: Tue May 28 05:54:10 2013
Log: switched new run to be in use by default. this breaks the build.
http://code.google.com/p/robotframework/source/detail?r=a18841e71e63
Modified:
/src/robot/new_running/builder.py
/src/robot/new_running/model.py
/src/robot/run.py
=======================================
--- /src/robot/new_running/builder.py Mon May 27 13:40:51 2013
+++ /src/robot/new_running/builder.py Tue May 28 05:54:10 2013
@@ -14,6 +14,7 @@
from robot.new_running.defaults import TestDefaults
from robot.parsing import TestData
+from robot.errors import DataError
from .model import TestSuite, ForLoop
@@ -25,12 +26,18 @@
def build(self, *paths):
if len(paths) == 1:
- return self._build_suite(TestData(source=paths[0]))
+ return self._build_suite(self._parse(paths[0]))
root = TestSuite()
for path in paths:
- root.suites.append(self._build_suite(TestData(source=path)))
+ root.suites.append(self._build_suite(self._parse(path)))
return root
+ def _parse(self, path):
+ try:
+ return TestData(source=path)
+ except DataError, err:
+ raise DataError("Parsing '%s' failed: %s" % (path,
unicode(err)))
+
def _build_suite(self, data, parent_defaults=None):
defaults = TestDefaults(data.setting_table, parent_defaults)
suite = TestSuite(name=data.name,
=======================================
--- /src/robot/new_running/model.py Tue May 28 04:50:04 2013
+++ /src/robot/new_running/model.py Tue May 28 05:54:10 2013
@@ -84,7 +84,6 @@
return Timeout(*timeout) if timeout else None
-
class TestSuite(model.TestSuite):
__slots__ = []
test_class = TestCase
@@ -127,11 +126,6 @@
namespace.IMPORTER.reset()
settings = settings or RobotSettings(options)
pyloggingconf.initialize(settings['LogLevel'])
- LOGGER.register_console_logger(width=settings['MonitorWidth'],
- colors=settings['MonitorColors'],
- markers=settings['MonitorMarkers'],
- stdout=settings['StdOut'],
- stderr=settings['StdErr'])
init_global_variables(settings)
output = Output(settings)
runner = Runner(output, settings)
=======================================
--- /src/robot/run.py Mon May 27 04:52:25 2013
+++ /src/robot/run.py Tue May 28 05:54:10 2013
@@ -351,10 +351,10 @@
def __init__(self):
Application.__init__(self, USAGE, arg_limits=(1,), logger=LOGGER)
- if os.environ.get('NEWRUN'):
- self.main = self.new_main
+ if os.environ.get('OLDRUN'):
+ self.main = self.old_main
- def main(self, datasources, **options):
+ def old_main(self, datasources, **options):
STOP_SIGNAL_MONITOR.start()
namespace.IMPORTER.reset()
settings = RobotSettings(options)
@@ -374,9 +374,14 @@
ResultWriter(settings.output).write_results(settings.get_rebot_settings())
return suite.return_code
- def new_main(self, datasources, **options):
+ def main(self, datasources, **options):
from robot.new_running import TestSuiteBuilder
settings = RobotSettings(options)
+ LOGGER.register_console_logger(width=settings['MonitorWidth'],
+ colors=settings['MonitorColors'],
+ markers=settings['MonitorMarkers'],
+ stdout=settings['StdOut'],
+ stderr=settings['StdErr'])
suite = TestSuiteBuilder().build(*datasources)
suite.configure(**settings.suite_config)
result = suite.run(settings)
--
---
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.