[Native][tests] Separate Gradle tasks for different types of tests
This commit is contained in:
+6
-2
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.konan.blackboxtest.AbstractNativeBlackBoxTest
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseExtTestCaseGroupProvider
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseStandardTestCaseGroupProvider
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.junit.jupiter.api.Tag
|
||||
|
||||
fun main() {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -20,7 +21,7 @@ fun main() {
|
||||
testGroup("native/native.tests/tests-gen", "compiler/testData") {
|
||||
testClass<AbstractNativeBlackBoxTest>(
|
||||
suiteTestClassName = "NativeExtBlackBoxTestGenerated",
|
||||
annotations = listOf(annotation(UseExtTestCaseGroupProvider::class.java))
|
||||
annotations = listOf(daily(), provider<UseExtTestCaseGroupProvider>())
|
||||
) {
|
||||
model("codegen/box", targetBackend = TargetBackend.NATIVE)
|
||||
model("codegen/boxInline", targetBackend = TargetBackend.NATIVE)
|
||||
@@ -30,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>(
|
||||
annotations = listOf(annotation(UseStandardTestCaseGroupProvider::class.java))
|
||||
annotations = listOf(daily(), provider<UseStandardTestCaseGroupProvider>())
|
||||
) {
|
||||
model("samples")
|
||||
model("samples2")
|
||||
@@ -38,3 +39,6 @@ fun main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private inline fun <reified T : Annotation> provider() = annotation(T::class.java)
|
||||
private fun daily() = annotation(Tag::class.java, "daily")
|
||||
|
||||
+2
@@ -10,8 +10,10 @@ package org.jetbrains.kotlin.konan.blackboxtest
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestCaseId
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCase as TC
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCases
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.TestFactory
|
||||
|
||||
@Tag("daily")
|
||||
@PredefinedTestCases(
|
||||
TC(
|
||||
name = "nativeStdlib",
|
||||
|
||||
+2
@@ -14,10 +14,12 @@ import org.jetbrains.kotlin.konan.target.Family
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
import kotlin.coroutines.Continuation
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_CompressedNamesTest {
|
||||
@Test
|
||||
fun targetNameCompression() {
|
||||
|
||||
+2
@@ -10,12 +10,14 @@ import org.jetbrains.kotlin.konan.blackboxtest.support.util.sanitizedName
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.fail
|
||||
import java.io.File
|
||||
import kotlin.io.path.createTempDirectory
|
||||
|
||||
@Suppress("ClassName")
|
||||
@Tag("infrastructure")
|
||||
class TestInfra_GlobsExpansionTest {
|
||||
private lateinit var testDir: File
|
||||
|
||||
|
||||
+2
@@ -8,9 +8,11 @@ package org.jetbrains.kotlin.konan.blackboxtest
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.PackageName
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestName
|
||||
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 {
|
||||
@Test
|
||||
fun parsePackageName() {
|
||||
|
||||
+2
@@ -8,9 +8,11 @@ package org.jetbrains.kotlin.konan.blackboxtest
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestName
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.parseGTestListing
|
||||
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 {
|
||||
@Test
|
||||
fun successfullyParsed() = assertEquals(
|
||||
|
||||
Reference in New Issue
Block a user