test/hotspot/jtreg/compiler/graalunit/com.oracle.mxtool.junit/com/oracle/mxtool/junit/TextRunListener.java
changeset 58523 fb3d408c7a7e
parent 50908 7c51db95ccb6
--- a/test/hotspot/jtreg/compiler/graalunit/com.oracle.mxtool.junit/com/oracle/mxtool/junit/TextRunListener.java	Wed Oct 09 20:12:46 2019 +0200
+++ b/test/hotspot/jtreg/compiler/graalunit/com.oracle.mxtool.junit/com/oracle/mxtool/junit/TextRunListener.java	Wed Oct 09 10:59:45 2019 -0700
@@ -74,7 +74,8 @@
     }
 
     public static RunListener createRunListener(MxRunListener l) {
-        return new TextListener(l.getWriter()) {
+        PrintStream theWriter = l.getWriter();
+        return new TextListener(theWriter) {
             private Class<?> lastClass;
             private int passedInLastClass;
             private int failedInLastClass;
@@ -143,6 +144,15 @@
             public void testAssumptionFailure(Failure failure) {
                 l.testAssumptionFailure(failure);
             }
+
+            @Override
+            protected void printFailure(Failure each, String prefix) {
+                // Print out the test message in the same format used to run a single test:
+                // my.package.MyClass#methodName
+                String header = each.getDescription().getClassName() + "#" + each.getDescription().getMethodName();
+                theWriter.println(prefix + ") " + header);
+                theWriter.print(each.getTrace());
+            }
         };
     }
 }