[Native][tests] Re-organize Gradle tasks and test suite classes
This commit is contained in:
+5
-4
@@ -20,8 +20,8 @@ fun main() {
|
||||
// External box tests.
|
||||
testGroup("native/native.tests/tests-gen", "compiler/testData") {
|
||||
testClass<AbstractNativeBlackBoxTest>(
|
||||
suiteTestClassName = "NativeExtBlackBoxTestGenerated",
|
||||
annotations = listOf(daily(), provider<UseExtTestCaseGroupProvider>())
|
||||
suiteTestClassName = "ExternalTestGenerated",
|
||||
annotations = listOf(external(), provider<UseExtTestCaseGroupProvider>())
|
||||
) {
|
||||
model("codegen/box", targetBackend = TargetBackend.NATIVE)
|
||||
model("codegen/boxInline", targetBackend = TargetBackend.NATIVE)
|
||||
@@ -31,7 +31,7 @@ fun main() {
|
||||
// Samples (how to utilize the abilities of new test infrastructure).
|
||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||
testClass<AbstractNativeBlackBoxTest>(
|
||||
suiteTestClassName = "NativeInfraBlackBoxTestGenerated",
|
||||
suiteTestClassName = "InfrastructureTestGenerated",
|
||||
annotations = listOf(infrastructure(), provider<UseStandardTestCaseGroupProvider>())
|
||||
) {
|
||||
model("samples")
|
||||
@@ -42,5 +42,6 @@ fun main() {
|
||||
}
|
||||
|
||||
private inline fun <reified T : Annotation> provider() = annotation(T::class.java)
|
||||
private fun daily() = annotation(Tag::class.java, "daily")
|
||||
|
||||
private fun external() = annotation(Tag::class.java, "external")
|
||||
private fun infrastructure() = annotation(Tag::class.java, "infrastructure")
|
||||
|
||||
+1
-2
@@ -18,9 +18,8 @@ import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.coroutines.Continuation
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_CompressedNamesTest {
|
||||
class InfrastructureCompressedNamesTest {
|
||||
@Test
|
||||
fun targetNameCompression() {
|
||||
val knownTargets: Set<KonanTarget> = KonanTarget.predefinedTargets.values.toSet()
|
||||
+2
-3
@@ -16,14 +16,13 @@ import org.junit.jupiter.api.fail
|
||||
import java.io.File
|
||||
import kotlin.io.path.createTempDirectory
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_GlobsExpansionTest {
|
||||
class InfrastructureGlobsExpansionTest {
|
||||
private lateinit var testDir: File
|
||||
|
||||
@BeforeEach
|
||||
fun setUp() {
|
||||
testDir = createTempDirectory(TestInfra_GlobsExpansionTest::class.java.sanitizedName).toFile()
|
||||
testDir = createTempDirectory(InfrastructureGlobsExpansionTest::class.java.sanitizedName).toFile()
|
||||
}
|
||||
|
||||
@Test
|
||||
+1
-2
@@ -11,9 +11,8 @@ import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_NamedEntitiesTest {
|
||||
class InfrastructureNamedEntitiesTest {
|
||||
@Test
|
||||
fun parsePackageName() {
|
||||
listOf(
|
||||
+1
-2
@@ -12,9 +12,8 @@ import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_OutputFilterTest {
|
||||
class InfrastructureOutputFilterTest {
|
||||
@Test
|
||||
fun noFiltering() {
|
||||
val randomTestOutput = List(100) { (Char.MIN_VALUE..Char.MAX_VALUE).random() }.joinToString("")
|
||||
+1
-2
@@ -11,9 +11,8 @@ import org.junit.jupiter.api.Assertions.*
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_TestListingTest {
|
||||
class InfrastructureTestListingTest {
|
||||
@Test
|
||||
fun successfullyParsed() = assertEquals(
|
||||
listOf(
|
||||
+2
-2
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCases
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.TestFactory
|
||||
|
||||
@Tag("daily")
|
||||
@Tag("external")
|
||||
@PredefinedTestCases(
|
||||
TC(
|
||||
name = "nativeStdlib",
|
||||
@@ -54,7 +54,7 @@ import org.junit.jupiter.api.TestFactory
|
||||
sourceLocations = ["libraries/kotlin.test/common/src/test/kotlin/**.kt"]
|
||||
)
|
||||
)
|
||||
class NativeStdlibBlackBoxTest : AbstractNativeBlackBoxTest() {
|
||||
class StdlibTest : AbstractNativeBlackBoxTest() {
|
||||
@TestFactory
|
||||
fun kotlinTest() = dynamicTestCase(TestCaseId.Named("kotlinTest"))
|
||||
|
||||
Reference in New Issue
Block a user