Android tests: use directives from tests-common to determine if the test is supposed to pass on JVM (adds support for IGNORE_BACKEND and IGNORE_BACKEND_WItHOUT_CHECK" directives).

This commit is contained in:
Anton Bannykh
2016-11-18 20:23:01 +03:00
parent 85a775375a
commit 2bec54924f
2 changed files with 7 additions and 20 deletions
@@ -247,4 +247,9 @@ public final class InTextDirectivesUtils {
public static boolean isIgnoredTargetWithoutCheck(TargetBackend targetBackend, File file) {
return isIgnoredTargetByPrefix(targetBackend, file, "// IGNORE_BACKEND_WITHOUT_CHECK: ");
}
// Whether the target test is supposed to pass successfully on targetBackend
public static boolean isPassingTarget(TargetBackend targetBackend, File file) {
return isCompatibleTarget(targetBackend, file) && !isIgnoredTarget(targetBackend, file) && !isIgnoredTargetWithoutCheck(targetBackend, file);
}
}