5 new revisions:

Revision: eff46929c2cd
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 12:47:49 2013
Log:      timeout releated fixes and cleanup
http://code.google.com/p/robotframework/source/detail?r=eff46929c2cd

Revision: 58a20a279028
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 13:42:55 2013
Log:      parsing enhancements
http://code.google.com/p/robotframework/source/detail?r=58a20a279028

Revision: c3068f0723b9
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 13:53:54 2013
Log:      test fixes
http://code.google.com/p/robotframework/source/detail?r=c3068f0723b9

Revision: 594b9fcd58eb
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 14:11:14 2013
Log: fixed handling list variables in tags. handlign non-existing vars in t...
http://code.google.com/p/robotframework/source/detail?r=594b9fcd58eb

Revision: b6e86e47cf0f
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 14:44:17 2013
Log:      fixed removing empty suites when running tests
http://code.google.com/p/robotframework/source/detail?r=b6e86e47cf0f

==============================================================================
Revision: eff46929c2cd
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 12:47:49 2013
Log:      timeout releated fixes and cleanup
http://code.google.com/p/robotframework/source/detail?r=eff46929c2cd

Modified:
 /src/robot/new_running/defaults.py
 /src/robot/new_running/runner.py
 /src/robot/running/timeouts/__init__.py

=======================================
--- /src/robot/new_running/defaults.py  Sun May 26 02:31:26 2013
+++ /src/robot/new_running/defaults.py  Wed May 29 12:47:49 2013
@@ -25,6 +25,7 @@
         if parent:
             self.setup = self.setup or parent.setup
             self.teardown = self.teardown or parent.teardown
+            self.timeout = self.timeout or parent.timeout
             self.force_tags += parent.force_tags

     def get_test_values(self, test):
=======================================
--- /src/robot/new_running/runner.py    Wed May 29 10:09:59 2013
+++ /src/robot/new_running/runner.py    Wed May 29 12:47:49 2013
@@ -113,9 +113,9 @@
         self._context.start_test(result)
         status = TestStatus(self._suite_status)
         if not status.failures and not test.name:
- status.test_failed('Test case name cannot be empty.', test.critical) + status.test_failed('Test case name cannot be empty.', result.critical)
         if not status.failures and not keywords:
- status.test_failed('Test case contains no keywords.', test.critical) + status.test_failed('Test case contains no keywords.', result.critical)
         self._run_setup(test.keywords.setup, status, result)
         try:
             if not status.failures:
@@ -123,7 +123,7 @@
         except PassExecution, exception:
             err = exception.earlier_failures
             if err:
-                status.test_failed(err, test.critical)
+                status.test_failed(err, result.critical)
             else:
                 result.message = exception.message
         except ExecutionFailed, err:
@@ -133,6 +133,8 @@
         if status.teardown_allowed:
self._context.set_test_status_before_teardown(result.message, status.status) # TODO: This is fugly
             self._run_teardown(test.keywords.teardown, status, result)
+ if not status.failures and result.timeout and result.timeout.timed_out(): + status.test_failed(result.timeout.get_message(), result.critical)
         result.status = status.status
         result.message = status.message or result.message
         result.endtime = utils.get_timestamp()
=======================================
--- /src/robot/running/timeouts/__init__.py     Wed May 22 14:48:27 2013
+++ /src/robot/running/timeouts/__init__.py     Wed May 29 12:47:49 2013
@@ -113,13 +113,14 @@

 class TestTimeout(_Timeout):
     type = 'Test'
-    _keyword_timeouted = False
+    _keyword_timeout_occurred = False

     def set_keyword_timeout(self, timeout_occurred):
- self._keyword_timeouted = self._keyword_timeouted or timeout_occurred
+        if timeout_occurred:
+            self._keyword_timeout_occurred = True

     def any_timeout_occurred(self):
-        return self.timed_out() or self._keyword_timeouted
+        return self.timed_out() or self._keyword_timeout_occurred


 class KeywordTimeout(_Timeout):

==============================================================================
Revision: 58a20a279028
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 13:42:55 2013
Log:      parsing enhancements
http://code.google.com/p/robotframework/source/detail?r=58a20a279028

Modified:
 /src/robot/model/namepatterns.py
 /src/robot/new_running/builder.py
 /src/robot/parsing/model.py
 /src/robot/parsing/populators.py
 /src/robot/run.py
 /src/robot/utils/match.py

=======================================
--- /src/robot/model/namepatterns.py    Fri Mar  9 05:36:04 2012
+++ /src/robot/model/namepatterns.py    Wed May 29 13:42:55 2013
@@ -32,6 +32,9 @@
     def __nonzero__(self):
         return bool(self._matcher)

+    def __iter__(self):
+        return iter(self._matcher)
+

 class SuiteNamePatterns(_NamePatterns):

=======================================
--- /src/robot/new_running/builder.py   Tue May 28 12:29:31 2013
+++ /src/robot/new_running/builder.py   Wed May 29 13:42:55 2013
@@ -15,14 +15,16 @@
 from robot.new_running.defaults import TestDefaults
 from robot.parsing import TestData
 from robot.errors import DataError
+from robot.utils import abspath

 from .model import TestSuite, ForLoop


 class TestSuiteBuilder(object):

-    def __init__(self):
-        pass
+    def __init__(self, include_suites=None, warn_on_skipped=False):
+        self.include_suites = include_suites
+        self.warn_on_skipped = warn_on_skipped

     def build(self, *paths):
         if len(paths) == 1:
@@ -34,7 +36,9 @@

     def _parse(self, path):
         try:
-            return TestData(source=path)
+            return TestData(source=abspath(path),
+                            include_suites=self.include_suites,
+                            warn_on_skipped=self.warn_on_skipped)
         except DataError, err:
raise DataError("Parsing '%s' failed: %s" % (path, unicode(err)))

=======================================
--- /src/robot/parsing/model.py Wed May 22 02:41:21 2013
+++ /src/robot/parsing/model.py Wed May 29 13:42:55 2013
@@ -27,7 +27,7 @@
Resource, Variables, Arguments, Return, Template, MetadataList, ImportList)


-def TestData(parent=None, source=None, include_suites=[],
+def TestData(parent=None, source=None, include_suites=None,
              warn_on_skipped=False):
# TODO: can we change the order of parent and source?? source seems mandatory
     """Parses a file or directory to a corresponding model object.
@@ -195,7 +195,7 @@
         self.keyword_table = KeywordTable(self)
         _TestData.__init__(self, parent, source)

- def populate(self, include_suites=[], warn_on_skipped=False, recurse=True): + def populate(self, include_suites=None, warn_on_skipped=False, recurse=True): FromDirectoryPopulator().populate(self.source, self, include_suites,
                                           warn_on_skipped, recurse)
         self.children = [ch for ch in self.children if ch.has_tests()]
=======================================
--- /src/robot/parsing/populators.py    Sun Dec 30 12:03:46 2012
+++ /src/robot/parsing/populators.py    Wed May 29 13:42:55 2013
@@ -101,8 +101,8 @@
     ignored_prefixes = ('_', '.')
     ignored_dirs = ('CVS',)

-    def populate(self, path, datadir, include_suites, warn_on_skipped,
-                 recurse=True):
+    def populate(self, path, datadir, include_suites=None,
+                 warn_on_skipped=False, recurse=True):
         LOGGER.info("Parsing test data directory '%s'" % path)
         include_suites = self._get_include_suites(path, include_suites)
         init_file, children = self._get_children(path, include_suites)
@@ -136,7 +136,8 @@
     def _get_include_suites(self, path, incl_suites):
         if not isinstance(incl_suites, SuiteNamePatterns):
# Use only the last part of names given like '--suite parent.child' - incl_suites = SuiteNamePatterns(i.split('.')[-1] for i in incl_suites)
+            incl_suites = SuiteNamePatterns(i.split('.')[-1]
+                                            for i in incl_suites or [])
         if not incl_suites:
             return incl_suites
# If a directory is included, also all its children should be included.
=======================================
--- /src/robot/run.py   Wed May 29 02:23:46 2013
+++ /src/robot/run.py   Wed May 29 13:42:55 2013
@@ -391,7 +391,8 @@
                                        stdout=settings['StdOut'],
                                        stderr=settings['StdErr'])
         LOGGER.info(unicode(settings))
-        suite = TestSuiteBuilder().build(*datasources)
+        suite = TestSuiteBuilder(settings['SuiteNames'],
+ settings['WarnOnSkipped']).build(*datasources)
         suite.configure(**settings.suite_config)
         result = suite.run(settings)
         result.configure(status_rc=settings.status_rc)
=======================================
--- /src/robot/utils/match.py   Fri Mar  9 11:57:04 2012
+++ /src/robot/utils/match.py   Wed May 29 13:42:55 2013
@@ -75,7 +75,7 @@
         if patterns is None:
             return []
         if isinstance(patterns, basestring):
-            return  [patterns]
+            return [patterns]
         return patterns

     def match(self, string):

==============================================================================
Revision: c3068f0723b9
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 13:53:54 2013
Log:      test fixes
http://code.google.com/p/robotframework/source/detail?r=c3068f0723b9

Modified:
 /atest/robot/cli/runner/invalid_usage.txt

=======================================
--- /atest/robot/cli/runner/invalid_usage.txt   Wed May 29 03:45:04 2013
+++ /atest/robot/cli/runner/invalid_usage.txt   Wed May 29 13:53:54 2013
@@ -13,10 +13,10 @@
Run Should Fail --argumentfile option --argumentfile requires argument

 Non-Existing Input
- Run Should Fail nonexisting.html Parsing '.*[/\\\\]nonexisting.html' failed: Data source does not exist\\. + Run Should Fail nonexisting.html Parsing 'nonexisting\\.html' failed: Data source does not exist\\.

 Non-Existing Input With Non-Ascii Characters
- Run Should Fail eitäällä.txt Parsing '.*[/\\\\]eitäällä\\.txt' failed: Data source does not exist\\. + Run Should Fail eitäällä.txt Parsing 'eitäällä\\.txt' failed: Data source does not exist\\.

 Invalid Options
     Run Should Fail  --invalid option  option --invalid not recognized

==============================================================================
Revision: 594b9fcd58eb
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 14:11:14 2013
Log: fixed handling list variables in tags. handlign non-existing vars in tags still missing.
http://code.google.com/p/robotframework/source/detail?r=594b9fcd58eb

Modified:
 /atest/resources/TestCheckerLibrary.py
 /atest/testdata/tags/default_and_force_tags.txt
 /src/robot/new_running/runner.py

=======================================
--- /atest/resources/TestCheckerLibrary.py      Wed May  8 01:36:35 2013
+++ /atest/resources/TestCheckerLibrary.py      Wed May 29 14:11:14 2013
@@ -141,6 +141,7 @@
                 raise AssertionError('Suite %s not found' % expected)

     def should_contain_tags(self, test, *tags):
+        print 'Test has tags', test.tags
         assert_equals(len(test.tags), len(tags), 'Wrong number of tags')
tags = sorted(tags, key=lambda s: s.lower().replace('_', '').replace(' ', ''))
         for act, exp in zip(test.tags, tags):
=======================================
--- /atest/testdata/tags/default_and_force_tags.txt     Fri Nov 23 15:16:41 2012
+++ /atest/testdata/tags/default_and_force_tags.txt     Wed May 29 14:11:14 2013
@@ -1,13 +1,17 @@
 *** Setting ***
-Force Tags        01    ${EMPTY}    02
-Default Tags      03    ${EMPTY}    four
+Force Tags        01    ${EMPTY}    02    @{EMPTY}
+Default Tags      @{DEFAULTS}
+
+*** Variables ***
+@{DEFAULTS}       03    ${EMPTY}    four
+

 *** Test Case ***
 No Own Tags
     No Operation

 Own Tags
-    [Tags]    FOUR    viisi    00    ${EMPTY}    01    01
+    [Tags]    FOUR    viisi    @{EMPTY}    00    ${EMPTY}    01    01
     No Operation

 Own Tags Empty
=======================================
--- /src/robot/new_running/runner.py    Wed May 29 12:47:49 2013
+++ /src/robot/new_running/runner.py    Wed May 29 14:11:14 2013
@@ -104,8 +104,7 @@
         self._executed_tests[test.name] = True
         result = self._suite.tests.create(name=test.name,
doc=self._resolve_setting(test.doc),
-                                          tags=[self._resolve_setting(t)
-                                                for t in test.tags],
+ tags=self._variables.replace_meta('fixme', test.tags, []),
                                           starttime=utils.get_timestamp(),
                                           timeout=self._get_timeout(test),
                                           status='RUNNING')

==============================================================================
Revision: b6e86e47cf0f
Branch:   default
Author:   Pekka Klärck
Date:     Wed May 29 14:44:17 2013
Log:      fixed removing empty suites when running tests
http://code.google.com/p/robotframework/source/detail?r=b6e86e47cf0f

Modified:
 /atest/resources/TestCheckerLibrary.py
 /atest/robot/core/test_suite_dir.txt
 /src/robot/model/configurer.py
 /src/robot/model/filter.py
 /src/robot/model/testsuite.py

=======================================
--- /atest/resources/TestCheckerLibrary.py      Wed May 29 14:11:14 2013
+++ /atest/resources/TestCheckerLibrary.py      Wed May 29 14:44:17 2013
@@ -134,6 +134,7 @@
raise AssertionError('Suite should not have contained test "%s"' % name)

     def should_contain_suites(self, suite, *suite_names):
+        print 'Suite has suites', suite.suites
         actual_names = [s.name for s in suite.suites]
assert_equals(len(actual_names), len(suite_names), 'Wrong number of subsuites')
         for expected in suite_names:
=======================================
--- /atest/robot/core/test_suite_dir.txt        Fri Jul  2 03:20:16 2010
+++ /atest/robot/core/test_suite_dir.txt        Wed May 29 14:44:17 2013
@@ -31,11 +31,12 @@
     Suite Passed  Test File 3  ${1_test_msg}

 Child Suites Not Containing Tests Not Executed
-    Check Parsing Failed Due To No Test Cases  no_tests_file_1.html
- Check Parsing Failed Due To No Test Cases test_dir_1/no_tests_file_2.html - Check Parsing Failed Due To No Test Cases test_dir_1/no_tests_dir_2/no_tests_file_3.html
-    Check Sub Suite Count  Test Suite Dir  2
-    Check Sub Suite Count  Test Dir 1  2
+    Should Contain Suites    ${SUITE}    Test Dir 1    Test File 1
+ Should Contain Suites ${SUITE.suites[0]} Test Dir 2 Test File 2
+    Should Contain Suites    ${SUITE.suites[1]}
+    Should Contain Suites    ${SUITE.suites[0].suites[0]}    Test Dir 3
+ Should Contain Suites ${SUITE.suites[0].suites[0].suites[0]} Test File 3
+

 File Without Extension
     Check Syslog Contains  Ignoring file or directory 'no_extension'.
@@ -53,9 +54,3 @@
     [Arguments]  ${name}  ${expected_count}
     ${suite} =  Get Test Suite  ${name}
     Length Should Be  ${suite.suites}  ${expected_count}
-
-Check Parsing Failed Due To No Test Cases
-    [Arguments]  ${file}
- ${path} = Normalize Path ${CURDIR}/../../testdata/core/test_suite_dir/${file} - Check Syslog Contains Running test suite '${path}' failed: Test suite contains no test cases.
-
=======================================
--- /src/robot/model/configurer.py      Wed May 22 04:57:27 2013
+++ /src/robot/model/configurer.py      Wed May 29 14:44:17 2013
@@ -49,6 +49,7 @@
         self._filter(suite)
         suite.set_tags(self.add_tags, self.remove_tags)
         suite.set_criticality(self.critical_tags, self.non_critical_tags)
+        suite.remove_empty_suites()

     def _set_suite_attributes(self, suite):
         if self.name:
=======================================
--- /src/robot/model/filter.py  Tue Mar  6 00:46:30 2012
+++ /src/robot/model/filter.py  Wed May 29 14:44:17 2013
@@ -19,7 +19,19 @@
 from .visitor import SuiteVisitor


-class Filter(SuiteVisitor):
+class EmptySuiteRemover(SuiteVisitor):
+
+    def end_suite(self, suite):
+        suite.suites = [s for s in suite.suites if s.test_count]
+
+    def visit_test(self, test):
+        pass
+
+    def visit_keyword(self, kw):
+        pass
+
+
+class Filter(EmptySuiteRemover):

     def __init__(self, include_suites=None, include_tests=None,
                  include_tags=None, exclude_tags=None):
@@ -83,15 +95,6 @@
     def _not_excluded_by_tags(self, test):
         return not self.exclude_tags.match(test.tags)

-    def end_suite(self, suite):
-        suite.suites = [s for s in suite.suites if s.test_count]
-
-    def visit_test(self, test):
-        pass
-
-    def visit_keyword(self, keyword):
-        pass
-
     def __nonzero__(self):
         return bool(self.include_suites or self.include_tests or
                     self.include_tags or self.exclude_tags)
=======================================
--- /src/robot/model/testsuite.py       Wed May 29 08:42:16 2013
+++ /src/robot/model/testsuite.py       Wed May 29 14:44:17 2013
@@ -16,7 +16,7 @@

 from .configurer import SuiteConfigurer
 from .criticality import Criticality
-from .filter import Filter
+from .filter import Filter, EmptySuiteRemover
 from .itemlist import ItemList
 from .keyword import Keyword, Keywords
 from .metadata import Metadata
@@ -112,6 +112,9 @@
     def configure(self, **options):
         self.visit(SuiteConfigurer(**options))

+    def remove_empty_suites(self):
+        self.visit(EmptySuiteRemover())
+
     def visit(self, visitor):
         visitor.visit_suite(self)

--

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