[Test] Ignore Native codegen test with IGNORE_BACKEND_...: ANY directive
This commit is contained in:
committed by
Space Team
parent
ae7718514b
commit
a0bdecd22b
+7
-1
@@ -245,8 +245,14 @@ public final class InTextDirectivesUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isIgnoredTarget(@NotNull TargetBackend targetBackend, @NotNull File file, String... ignoreBackendDirectivePrefixes) {
|
public static boolean isIgnoredTarget(@NotNull TargetBackend targetBackend, @NotNull File file, String... ignoreBackendDirectivePrefixes) {
|
||||||
|
return isIgnoredTarget(targetBackend, file, false, ignoreBackendDirectivePrefixes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isIgnoredTarget(@NotNull TargetBackend targetBackend, @NotNull File file, boolean includeAny, String... ignoreBackendDirectivePrefixes) {
|
||||||
List<String> ignoredBackends = findListWithPrefixes(textWithDirectives(file), ignoreBackendDirectivePrefixes);
|
List<String> ignoredBackends = findListWithPrefixes(textWithDirectives(file), ignoreBackendDirectivePrefixes);
|
||||||
return ignoredBackends.contains(targetBackend.name());
|
if (ignoredBackends.contains(targetBackend.name())) return true;
|
||||||
|
if (includeAny && ignoredBackends.contains("ANY")) return true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isIgnoredTarget(@NotNull TargetBackend targetBackend, @NotNull File file) {
|
public static boolean isIgnoredTarget(@NotNull TargetBackend targetBackend, @NotNull File file) {
|
||||||
|
|||||||
+14
-2
@@ -146,9 +146,21 @@ private class ExtTestDataFile(
|
|||||||
private fun isIgnoredNativeTarget(pipelineType: PipelineType, testDataFile: File): Boolean {
|
private fun isIgnoredNativeTarget(pipelineType: PipelineType, testDataFile: File): Boolean {
|
||||||
return when (pipelineType) {
|
return when (pipelineType) {
|
||||||
PipelineType.K1 ->
|
PipelineType.K1 ->
|
||||||
isIgnoredTarget(TargetBackend.NATIVE, testDataFile, IGNORE_BACKEND_DIRECTIVE_PREFIX, IGNORE_BACKEND_K1_DIRECTIVE_PREFIX)
|
isIgnoredTarget(
|
||||||
|
TargetBackend.NATIVE,
|
||||||
|
testDataFile,
|
||||||
|
/*includeAny = */true,
|
||||||
|
IGNORE_BACKEND_DIRECTIVE_PREFIX,
|
||||||
|
IGNORE_BACKEND_K1_DIRECTIVE_PREFIX
|
||||||
|
)
|
||||||
PipelineType.K2 ->
|
PipelineType.K2 ->
|
||||||
isIgnoredTarget(TargetBackend.NATIVE, testDataFile, IGNORE_BACKEND_DIRECTIVE_PREFIX, IGNORE_BACKEND_K2_DIRECTIVE_PREFIX)
|
isIgnoredTarget(
|
||||||
|
TargetBackend.NATIVE,
|
||||||
|
testDataFile,
|
||||||
|
/*includeAny = */true,
|
||||||
|
IGNORE_BACKEND_DIRECTIVE_PREFIX,
|
||||||
|
IGNORE_BACKEND_K2_DIRECTIVE_PREFIX
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user