Remove IGNORE_BACKEND_WITHOUT_CHECK and introduce DONT_RUN_GENERATED_CODE

Support DONT_RUN_GENERATED_CODE in JS Box tests.

IGNORE_BACKEND_WITHOUT_CHECK is removed because of
it's often wrongly used and in most cases can be
replaced with IGNORE_BACKEND or DONT_RUN_GENERATED_CODE
or with combination of them.
This commit is contained in:
Zalim Bashorov
2018-04-16 23:56:03 +03:00
parent d03a128aa5
commit ad2ea8f999
4 changed files with 36 additions and 20 deletions
@@ -233,12 +233,13 @@ public final class InTextDirectivesUtils {
return ignoredBackends.contains(targetBackend.name());
}
public static boolean isIgnoredTargetWithoutCheck(TargetBackend targetBackend, File file) {
return isIgnoredTargetByPrefix(targetBackend, file, "// IGNORE_BACKEND_WITHOUT_CHECK: ");
public static boolean dontRunGeneratedCode(TargetBackend targetBackend, File file) {
List<String> backends = findListWithPrefixes(textWithDirectives(file), "// DONT_RUN_GENERATED_CODE: ");
return backends.contains(targetBackend.name());
}
// 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);
return isCompatibleTarget(targetBackend, file) && !isIgnoredTarget(targetBackend, file);
}
}