From a8eebd7e1af94100c62a9b7f262fb1c54e29cf9f Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 17 Mar 2021 23:27:12 +0300 Subject: [PATCH] JUnit: support ignoring all tests in a class --- .../src/main/java/org/teavm/junit/TeaVMTestRunner.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java b/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java index 2e5f99acd..e1ea53789 100644 --- a/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java +++ b/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java @@ -1066,7 +1066,10 @@ public class TeaVMTestRunner extends Runner implements Filterable { } private boolean isIgnored(Method method) { - return getAnnotation(method, JUNIT4_IGNORE) != null || getAnnotation(method, TESTNG_IGNORE) != null; + return getAnnotation(method, JUNIT4_IGNORE) != null + || getAnnotation(method, TESTNG_IGNORE) != null + || getClassAnnotation(method, JUNIT4_IGNORE) != null + || getClassAnnotation(method, TESTNG_IGNORE) != null; } private AnnotationHolder getAnnotation(Method method, String name) { @@ -1090,6 +1093,7 @@ public class TeaVMTestRunner extends Runner implements Filterable { return cls.getAnnotations().get(name); } + private CompileResult compile(TeaVMTestConfiguration configuration, Supplier targetSupplier, String entryPoint, File path, String extension, CompilePostProcessor postBuild, boolean separateDir,