[Native][tests] Don't enforce test mode for KLIB ABI tests

This commit is contained in:
Dmitriy Dolovov
2022-05-16 14:34:12 +03:00
committed by Space
parent edacd90a6c
commit 6cf945f512
3 changed files with 2 additions and 80 deletions
@@ -7,8 +7,6 @@ package org.jetbrains.kotlin.konan.blackboxtest;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedProperty;
import org.jetbrains.kotlin.konan.blackboxtest.support.ClassLevelProperty;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
@@ -20,7 +18,6 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/klibABI")
@TestDataPath("$PROJECT_ROOT")
@EnforcedProperty(property = ClassLevelProperty.CACHE_MODE, propertyValue = "NO")
public class KlibABITestGenerated extends AbstractNativeKlibABITest {
@Test
public void testAllFilesPresentInKlibABI() throws Exception {
@@ -1,59 +0,0 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.konan.blackboxtest;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedProperty;
import org.jetbrains.kotlin.konan.blackboxtest.support.ClassLevelProperty;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/klibABI")
@TestDataPath("$PROJECT_ROOT")
@EnforcedProperty(property = ClassLevelProperty.CACHE_MODE, propertyValue = "STATIC_EVERYWHERE")
public class KlibABITestWithCacheGenerated extends AbstractNativeKlibABITest {
@Test
public void testAllFilesPresentInKlibABI() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/klibABI"), Pattern.compile("^([^_](.+))$"), null, false);
}
@Test
@TestMetadata("removeClassAsParameterType")
public void testRemoveClassAsParameterType() throws Exception {
runTest("compiler/testData/klibABI/removeClassAsParameterType/");
}
@Test
@TestMetadata("removeClassAsReturnType")
public void testRemoveClassAsReturnType() throws Exception {
runTest("compiler/testData/klibABI/removeClassAsReturnType/");
}
@Test
@TestMetadata("removeClassAsSuperTypeArgument")
public void testRemoveClassAsSuperTypeArgument() throws Exception {
runTest("compiler/testData/klibABI/removeClassAsSuperTypeArgument/");
}
@Test
@TestMetadata("removeClassAsTypeArgument")
public void testRemoveClassAsTypeArgument() throws Exception {
runTest("compiler/testData/klibABI/removeClassAsTypeArgument/");
}
@Test
@TestMetadata("removeFunction")
public void testRemoveFunction() throws Exception {
runTest("compiler/testData/klibABI/removeFunction/");
}
}
@@ -7,14 +7,11 @@ package org.jetbrains.kotlin.generators.tests
import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5
import org.jetbrains.kotlin.generators.model.annotation
import org.jetbrains.kotlin.konan.blackboxtest.AbstractNativeCodegenBoxTest
import org.jetbrains.kotlin.konan.blackboxtest.AbstractNativeBlackBoxTest
import org.jetbrains.kotlin.konan.blackboxtest.AbstractNativeCodegenBoxTest
import org.jetbrains.kotlin.konan.blackboxtest.AbstractNativeKlibABITest
import org.jetbrains.kotlin.konan.blackboxtest.support.ClassLevelProperty
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedProperty
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseExtTestCaseGroupProvider
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseStandardTestCaseGroupProvider
import org.jetbrains.kotlin.konan.blackboxtest.support.settings.CacheMode
import org.jetbrains.kotlin.test.TargetBackend
import org.junit.jupiter.api.Tag
@@ -47,14 +44,7 @@ fun main() {
// KLIB ABI tests.
testGroup("native/native.tests/tests-gen", "compiler/testData") {
testClass<AbstractNativeKlibABITest>(
suiteTestClassName = "KlibABITestGenerated",
annotations = listOf(enforcedCacheMode(CacheMode.Alias.NO))
) {
model("klibABI/", pattern = "^([^_](.+))$", recursive = false)
}
testClass<AbstractNativeKlibABITest>(
suiteTestClassName = "KlibABITestWithCacheGenerated",
annotations = listOf(enforcedCacheMode(CacheMode.Alias.STATIC_EVERYWHERE))
suiteTestClassName = "KlibABITestGenerated"
) {
model("klibABI/", pattern = "^([^_](.+))$", recursive = false)
}
@@ -66,9 +56,3 @@ private inline fun <reified T : Annotation> provider() = annotation(T::class.jav
private fun codegen() = annotation(Tag::class.java, "codegen")
private fun infrastructure() = annotation(Tag::class.java, "infrastructure")
private fun enforcedCacheMode(alias: CacheMode.Alias) = annotation(
EnforcedProperty::class.java,
EnforcedProperty::property.name to ClassLevelProperty.CACHE_MODE,
EnforcedProperty::propertyValue.name to alias.name
)