Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/7] oeqa/core/runner.py: Fix OETestTag listing
@ 2019-09-07 12:55 Nathan Rossi
  2019-09-07 12:55 ` [PATCH 3/7] oeqa/selftest: Use extraresults on self instead of self.tc Nathan Rossi
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Nathan Rossi @ 2019-09-07 12:55 UTC (permalink / raw)
  To: openembedded-core

Use the __oeqa_testtags attribute added by OETestTag and display no, one
or more tags separated by a comma. Also change the formatting of the
output so that the list of tests is formatted as "<test> (<tags>)" and
remove the table header for "id" (it is no longer available).

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
---
 meta/lib/oeqa/core/runner.py | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 930620ea19..63a8bae93f 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -205,23 +205,20 @@ class OETestRunner(_TestRunner):
                 self._walked_cases = self._walked_cases + 1
 
     def _list_tests_name(self, suite):
-        from oeqa.core.decorator.oetag import OETestTag
-
         self._walked_cases = 0
 
         def _list_cases(logger, case):
-            oetag = None
-
-            if hasattr(case, 'decorators'):
-                for d in case.decorators:
-                    if isinstance(d, OETestTag):
-                        oetag = d.oetag
-
-            logger.info("%s\t\t%s" % (oetag, case.id()))
+            oetags = []
+            if hasattr(case, '__oeqa_testtags'):
+                oetags = getattr(case, '__oeqa_testtags')
+            if oetags:
+                logger.info("%s (%s)" % (case.id(), ",".join(oetags)))
+            else:
+                logger.info("%s" % (case.id()))
 
         self.tc.logger.info("Listing all available tests:")
         self._walked_cases = 0
-        self.tc.logger.info("id\ttag\t\ttest")
+        self.tc.logger.info("test (tags)")
         self.tc.logger.info("-" * 80)
         self._walk_suite(suite, _list_cases)
         self.tc.logger.info("-" * 80)
---
2.23.0.rc1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-07 13:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-07 12:55 [PATCH 1/7] oeqa/core/runner.py: Fix OETestTag listing Nathan Rossi
2019-09-07 12:55 ` [PATCH 3/7] oeqa/selftest: Use extraresults on self instead of self.tc Nathan Rossi
2019-09-07 12:55 ` [PATCH 5/7] oeqa/core/decorator: Fix super class modifying subclass tags Nathan Rossi
2019-09-07 12:55 ` [PATCH 4/7] oeqa/selftest/context.py: Change -t/-T args to be optional Nathan Rossi
2019-09-07 12:55 ` [PATCH 6/7] oeqa/selftest/cases/gcc.py: Split into classes for parallelism Nathan Rossi
2019-09-07 12:55 ` [PATCH 7/7] oeqa/selftest/cases/glibc.py: Rework and tag with toolchain-user/system Nathan Rossi
2019-09-07 12:55 ` [PATCH 2/7] oeqa/core: Implement proper extra result collection and serialization Nathan Rossi
2019-09-07 13:02 ` ✗ patchtest: failure for "oeqa/core/runner.py: Fix OETes..." and 6 more Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox