[commit: ghc] wip/merge-queue: testsuite: Show both test name and way in JUnit output (6b38ddc)

git at git.haskell.org git at git.haskell.org
Sun Jan 13 00:06:30 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/merge-queue
Link       : http://ghc.haskell.org/trac/ghc/changeset/6b38ddc2f7dc7bc2edf99aba5a8a0c6004fb87bf/ghc

>---------------------------------------------------------------

commit 6b38ddc2f7dc7bc2edf99aba5a8a0c6004fb87bf
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Thu Jan 10 11:45:32 2019 -0500

    testsuite: Show both test name and way in JUnit output


>---------------------------------------------------------------

6b38ddc2f7dc7bc2edf99aba5a8a0c6004fb87bf
 testsuite/driver/junit.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/testsuite/driver/junit.py b/testsuite/driver/junit.py
index f2dbebb..f5daec1 100644
--- a/testsuite/driver/junit.py
+++ b/testsuite/driver/junit.py
@@ -15,24 +15,24 @@ def junit(t):
                           ('unexpected failure', t.unexpected_failures)]:
         for (directory, testname, reason, way) in group:
             testcase = ET.SubElement(testsuite, 'testcase',
-                                     classname = testname,
-                                     name = way)
+                                     classname = way,
+                                     name = '%s(%s)' % (testname, way))
             result = ET.SubElement(testcase, 'failure',
                                    type = res_type,
                                    message = reason)
 
     for (directory, testname, reason, way) in t.framework_failures:
         testcase = ET.SubElement(testsuite, 'testcase',
-                                 classname = testname,
-                                 name = way)
+                                 classname = way,
+                                 name = '%s(%s)' % (testname, way))
         result = ET.SubElement(testcase, 'error',
                                type = "framework failure",
                                message = reason)
 
     for (directory, testname, way) in t.expected_passes:
         testcase = ET.SubElement(testsuite, 'testcase',
-                                 classname = testname,
-                                 name = way)
+                                 classname = way,
+                                 name = '%s(%s)' % (testname, way))
 
     return ET.ElementTree(testsuites)
 



More information about the ghc-commits mailing list