]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa.buildperf: extend xml report format with test description
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 14 Nov 2016 10:54:06 +0000 (12:54 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Jan 2017 12:03:59 +0000 (12:03 +0000)
Add test description as an attribute to the <testcase> element.

[YOCTO #10590]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/buildperf/base.py

index efbe20c500a8463275f0e8bf524584c7559fb90c..b82476c110cc140f1987c823ff70f8b5599fe035 100644 (file)
@@ -273,6 +273,7 @@ class BuildPerfTestResult(unittest.TextTestResult):
             testcase = ET.SubElement(suite, 'testcase')
             testcase.set('classname', test.__module__ + '.' + test.__class__.__name__)
             testcase.set('name', test.name)
+            testcase.set('description', test.shortDescription())
             testcase.set('timestamp', test.start_time.isoformat())
             testcase.set('time', str(test.elapsed_time.total_seconds()))
             if status in ('ERROR', 'FAILURE', 'EXP_FAILURE'):
@@ -407,6 +408,9 @@ class BuildPerfTestCase(unittest.TestCase):
     def cmd_log_file(self):
         return os.path.join(self.out_dir, 'commands.log')
 
+    def shortDescription(self):
+        return super(BuildPerfTestCase, self).shortDescription() or ""
+
     def setUp(self):
         """Set-up fixture for each test"""
         if self.build_target: