-
- def visit_test_kw(self, test_kw):
- """Implements traversing through the test keyword and its child
- keywords.
-
- :param test_kw: Keyword to process.
- :type test_kw: Keyword
- :returns: Nothing.
- """
- for keyword in test_kw.keywords:
- if self.start_test_kw(keyword) is not False:
- self.visit_test_kw(keyword)
- self.end_test_kw(keyword)
-
- def start_test_kw(self, test_kw):
- """Called when test keyword starts. Default implementation does
- nothing.
-
- :param test_kw: Keyword to process.
- :type test_kw: Keyword
- :returns: Nothing.
- """
- if test_kw.name.count(u"Show Runtime On All Duts") or \
- test_kw.name.count(u"Show Runtime Counters On All Duts") or \
- test_kw.name.count(u"Vpp Show Runtime On All Duts"):
- self._msg_type = u"test-show-runtime"
- self._sh_run_counter += 1
- else:
- return
- test_kw.messages.visit(self)
-
- def end_test_kw(self, test_kw):
- """Called when keyword ends. Default implementation does nothing.
-
- :param test_kw: Keyword to process.
- :type test_kw: Keyword
- :returns: Nothing.
- """
-
- def visit_setup_kw(self, setup_kw):
- """Implements traversing through the teardown keyword and its child
- keywords.
-
- :param setup_kw: Keyword to process.
- :type setup_kw: Keyword
- :returns: Nothing.
- """
- for keyword in setup_kw.keywords:
- if self.start_setup_kw(keyword) is not False:
- self.visit_setup_kw(keyword)
- self.end_setup_kw(keyword)
-
- def start_setup_kw(self, setup_kw):
- """Called when teardown keyword starts. Default implementation does
- nothing.
-
- :param setup_kw: Keyword to process.
- :type setup_kw: Keyword
- :returns: Nothing.
- """
- if setup_kw.name.count(u"Show Vpp Version On All Duts") \
- and not self._version:
- self._msg_type = u"vpp-version"
- elif setup_kw.name.count(u"Install Dpdk Framework On All Duts") and \
- not self._version:
- self._msg_type = u"dpdk-version"
- elif setup_kw.name.count(u"Set Global Variable") \
- and not self._timestamp:
- self._msg_type = u"timestamp"
- elif setup_kw.name.count(u"Setup Framework") and not self._testbed:
- self._msg_type = u"testbed"
- else:
- return
- setup_kw.messages.visit(self)
-
- def end_setup_kw(self, setup_kw):
- """Called when keyword ends. Default implementation does nothing.
-
- :param setup_kw: Keyword to process.
- :type setup_kw: Keyword
- :returns: Nothing.
- """
-
- def visit_teardown_kw(self, teardown_kw):
- """Implements traversing through the teardown keyword and its child
- keywords.
-
- :param teardown_kw: Keyword to process.
- :type teardown_kw: Keyword
- :returns: Nothing.
- """
- for keyword in teardown_kw.keywords:
- if self.start_teardown_kw(keyword) is not False:
- self.visit_teardown_kw(keyword)
- self.end_teardown_kw(keyword)
-
- def start_teardown_kw(self, teardown_kw):
- """Called when teardown keyword starts
-
- :param teardown_kw: Keyword to process.
- :type teardown_kw: Keyword
- :returns: Nothing.
- """
- if teardown_kw.name.count(u"Show Papi History On All Duts"):
- self._conf_history_lookup_nr = 0
- self._msg_type = u"teardown-papi-history"
- teardown_kw.messages.visit(self)
-
- def end_teardown_kw(self, teardown_kw):
- """Called when keyword ends. Default implementation does nothing.
-
- :param teardown_kw: Keyword to process.
- :type teardown_kw: Keyword
- :returns: Nothing.
- """