changeset 1105:a355260808dc

Amend 7901279 with proper logging on annprocess failures.
author shade
date Wed, 28 Jan 2015 16:30:49 +0300
parents b5f788c594fe
children 39574a0ada2a
files jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java	Wed Jan 28 16:04:02 2015 +0300
+++ b/jmh-core-ct/src/test/java/org/openjdk/jmh/ct/CompileTest.java	Wed Jan 28 16:30:49 2015 +0300
@@ -81,6 +81,9 @@
         InMemoryGeneratorDestination destination = new InMemoryGeneratorDestination();
         boolean success = doTest(klass, destination);
         if (!success) {
+            for (String e : destination.getErrors()) {
+                System.err.println(e);
+            }
             Assert.fail("Should have passed.");
         }
     }
@@ -141,10 +144,10 @@
 
         if (!success) {
             for (JavaSourceFromString src : sources) {
-                System.out.println(src.getCharContent(false));
+                destination.printError(src.getCharContent(false).toString());
             }
             for (Diagnostic diagnostic : diagnostics.getDiagnostics()) {
-                System.out.println(diagnostic.getKind() + " at line " + diagnostic.getLineNumber() + ": " + diagnostic.getMessage(null));
+                destination.printError(diagnostic.getKind() + " at line " + diagnostic.getLineNumber() + ": " + diagnostic.getMessage(null));
             }
         }
 
@@ -180,7 +183,7 @@
 
             if (!success) {
                 for (JavaSourceFromString src : sources) {
-                    System.out.println(src.getCharContent(false));
+                    destination.printError(src.getCharContent(false).toString());
                 }
                 for (Diagnostic diagnostic : diagnostics.getDiagnostics()) {
                     destination.printError(diagnostic.getKind() + " at line " + diagnostic.getLineNumber() + ": " + diagnostic.getMessage(null));