< prev index next >
test/jdk/tools/jimage/JImageCliTest.java
Print this page
*** 95,116 ****
--- 95,123 ----
JImageResult assertShowsError() {
assertTrue(output.contains("Error"),
String.format("Output contains error, output=[%s]\n", output));
assertFalse(output.contains("Exception"),
String.format("Output doesn't contain a stacktrace, output=[%s]\n", output));
+ System.out.print(output);
return this;
}
JImageResult resultChecker(Consumer<JImageResult> r) { r.accept(this); return this; }
}
protected final void runTests() throws Throwable {
if (getImagePath() != null) {
+ Method beforeTestMethod = getClass().getDeclaredMethod("beforeTest");
for (Method m : getClass().getDeclaredMethods()) {
if (m.getName().startsWith("test")) {
+ if (beforeTestMethod != null) {
+ System.out.printf("Invoking %s\n", beforeTestMethod.getName());
+ beforeTestMethod.invoke(this);
+ }
System.out.printf("Invoking %s\n", m.getName());
m.invoke(this);
+ System.out.println();
}
}
} else {
System.out.println("This is not an image build. Skipping.");
}
< prev index next >