From 7285c57cd833900e8db781c644a23e3090da5d4e Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Wed, 25 Jan 2017 10:34:19 +0300 Subject: [PATCH] backend/tests: Generate external test tasks in config stage We generate tasks for external tests group during Gradle's configuration phase instead of using separate task (regenerate_external_tests) --- backend.native/tests/build.gradle | 76 +- backend.native/tests/external/build.gradle | 821 ------------------ .../org/jetbrains/kotlin/KonanTest.groovy | 4 +- settings.gradle | 1 - 4 files changed, 25 insertions(+), 877 deletions(-) delete mode 100644 backend.native/tests/external/build.gradle diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index ec765f98bd0..e15c4d8e13d 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -10,16 +10,17 @@ dependencies { } def testOutputRoot = rootProject.file("test.output").absolutePath +def externalTestsDir = project.file("external") allprojects { // Root directories for test output (logs, compiled files, statistics etc). Only single path must be in each set. sourceSets { - // :backend.native:tests + // backend.native/tests testOutputLocal { output.dir(rootProject.file("$testOutputRoot/local")) } - // :backend.native:tests:external + // backend.native/tests/external testOutputExternal { output.dir(rootProject.file("$testOutputRoot/external")) } @@ -32,63 +33,28 @@ task clean { } } -task regenerate_external_tests() { - doLast { - def externalTestsProject = childProjects["external"] - def gradleGenerated = externalTestsProject.file("build.gradle") - def externalTestsDir = externalTestsProject.file("codegen/blackbox") - gradleGenerated.write("import org.jetbrains.kotlin.*\n") - gradleGenerated.append( -""" -/******************************************************************************* -* WARNING: This file auto generated with command -* # ./gradlew :backend.native:tests:regenerate_external_tests -*******************************************************************************/ -configurations { - cli_bc -} - -dependencies { - cli_bc project(path: ':backend.native', configuration: 'cli_bc') -} -""" - ) - externalTestsDir.eachDirRecurse { - // Skip build directory and directories without *.kt files. - if (it.name == "build" || it.listFiles().count {it.name.endsWith(".kt")} == 0) { - return - } - - def taskDirectory = externalTestsProject.relativePath(it) - def taskName = taskDirectory.replaceAll("[-/]", '_') - - gradleGenerated.append( - "task $taskName (type: RunExternalTestGroup) {\n" + - " groupDirectory = \"$taskDirectory\"\n" + - "}\n\n") - } - gradleGenerated.append( -""" -task daily { - dependsOn(codegen_blackbox_annotations) -} - task run() { - dependsOn(tasks.withType(RunExternalTestGroup).matching { it.enabled }) -} -""" - ) - } -} - -task run() { - dependsOn(tasks.withType(KonanTest).matching { it.enabled }) + dependsOn(tasks.withType(KonanTest).matching { !(it instanceof RunExternalTestGroup) && it.enabled }) } task run_external () { // TODO Consider test output directory cleaning before execution. // TODO Consider using some logger instead of println - def testTasks = childProjects["external"].tasks.withType(RunExternalTestGroup).matching { it.enabled } + // Create tasks for external tests + externalTestsDir.eachDirRecurse { + // Skip build directory and directories without *.kt files. + if (it.name == "build" || it.listFiles().count {it.name.endsWith(".kt")} == 0) { + return + } + + def taskDirectory = project.relativePath(it) + def taskName = taskDirectory.replaceAll("[-/]", '_') + + task("$taskName", type: RunExternalTestGroup){ + groupDirectory = "$taskDirectory" + } + } + def testTasks = tasks.withType(RunExternalTestGroup).matching { it.enabled } dependsOn(testTasks) doLast { @@ -111,6 +77,10 @@ task run_external () { } } +task daily() { + dependsOn(run_external) +} + task sum (type:RunKonanTest) { source = "codegen/function/sum.kt" } diff --git a/backend.native/tests/external/build.gradle b/backend.native/tests/external/build.gradle deleted file mode 100644 index 55888a76ce8..00000000000 --- a/backend.native/tests/external/build.gradle +++ /dev/null @@ -1,821 +0,0 @@ -import org.jetbrains.kotlin.* - -/******************************************************************************* -* WARNING: This file auto generated with command -* # ./gradlew :backend.native:tests:regenerate_external_tests -*******************************************************************************/ -configurations { - cli_bc -} - -dependencies { - cli_bc project(path: ':backend.native', configuration: 'cli_bc') -} -task codegen_blackbox_annotations (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/annotations" -} - -task codegen_blackbox_annotations_annotatedLambda (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/annotations/annotatedLambda" -} - -task codegen_blackbox_argumentOrder (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/argumentOrder" -} - -task codegen_blackbox_arrays (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/arrays" -} - -task codegen_blackbox_arrays_multiDecl (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/arrays/multiDecl" -} - -task codegen_blackbox_arrays_multiDecl_int (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/arrays/multiDecl/int" -} - -task codegen_blackbox_arrays_multiDecl_long (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/arrays/multiDecl/long" -} - -task codegen_blackbox_binaryOp (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/binaryOp" -} - -task codegen_blackbox_boxingOptimization (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/boxingOptimization" -} - -task codegen_blackbox_bridges (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/bridges" -} - -task codegen_blackbox_bridges_substitutionInSuperClass (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/bridges/substitutionInSuperClass" -} - -task codegen_blackbox_builtinStubMethods (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/builtinStubMethods" -} - -task codegen_blackbox_builtinStubMethods_extendJavaCollections (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/builtinStubMethods/extendJavaCollections" -} - -task codegen_blackbox_callableReference_bound (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/callableReference/bound" -} - -task codegen_blackbox_callableReference_bound_equals (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/callableReference/bound/equals" -} - -task codegen_blackbox_callableReference_bound_inline (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/callableReference/bound/inline" -} - -task codegen_blackbox_callableReference_function (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/callableReference/function" -} - -task codegen_blackbox_callableReference_function_local (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/callableReference/function/local" -} - -task codegen_blackbox_callableReference_property (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/callableReference/property" -} - -task codegen_blackbox_casts (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/casts" -} - -task codegen_blackbox_casts_functions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/casts/functions" -} - -task codegen_blackbox_casts_literalExpressionAsGenericArgument (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/casts/literalExpressionAsGenericArgument" -} - -task codegen_blackbox_casts_mutableCollections (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/casts/mutableCollections" -} - -task codegen_blackbox_classes (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/classes" -} - -task codegen_blackbox_classes_inner (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/classes/inner" -} - -task codegen_blackbox_classLiteral (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/classLiteral" -} - -task codegen_blackbox_classLiteral_bound (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/classLiteral/bound" -} - -task codegen_blackbox_classLiteral_java (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/classLiteral/java" -} - -task codegen_blackbox_closures (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/closures" -} - -task codegen_blackbox_closures_captureOuterProperty (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/closures/captureOuterProperty" -} - -task codegen_blackbox_closures_closureInsideClosure (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/closures/closureInsideClosure" -} - -task codegen_blackbox_collections (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/collections" -} - -task codegen_blackbox_compatibility (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/compatibility" -} - -task codegen_blackbox_constants (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/constants" -} - -task codegen_blackbox_controlStructures (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/controlStructures" -} - -task codegen_blackbox_controlStructures_breakContinueInExpressions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/controlStructures/breakContinueInExpressions" -} - -task codegen_blackbox_controlStructures_returnsNothing (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/controlStructures/returnsNothing" -} - -task codegen_blackbox_controlStructures_tryCatchInExpressions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/controlStructures/tryCatchInExpressions" -} - -task codegen_blackbox_coroutines (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines" -} - -task codegen_blackbox_coroutines_controlFlow (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines/controlFlow" -} - -task codegen_blackbox_coroutines_intLikeVarSpilling (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines/intLikeVarSpilling" -} - -task codegen_blackbox_coroutines_multiModule (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines/multiModule" -} - -task codegen_blackbox_coroutines_stackUnwinding (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines/stackUnwinding" -} - -task codegen_blackbox_coroutines_suspendFunctionTypeCall (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines/suspendFunctionTypeCall" -} - -task codegen_blackbox_coroutines_unitTypeReturn (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/coroutines/unitTypeReturn" -} - -task codegen_blackbox_dataClasses (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/dataClasses" -} - -task codegen_blackbox_dataClasses_copy (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/dataClasses/copy" -} - -task codegen_blackbox_dataClasses_equals (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/dataClasses/equals" -} - -task codegen_blackbox_dataClasses_hashCode (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/dataClasses/hashCode" -} - -task codegen_blackbox_dataClasses_toString (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/dataClasses/toString" -} - -task codegen_blackbox_deadCodeElimination (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/deadCodeElimination" -} - -task codegen_blackbox_defaultArguments (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/defaultArguments" -} - -task codegen_blackbox_defaultArguments_constructor (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/defaultArguments/constructor" -} - -task codegen_blackbox_defaultArguments_convention (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/defaultArguments/convention" -} - -task codegen_blackbox_defaultArguments_function (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/defaultArguments/function" -} - -task codegen_blackbox_defaultArguments_private (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/defaultArguments/private" -} - -task codegen_blackbox_defaultArguments_signature (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/defaultArguments/signature" -} - -task codegen_blackbox_delegatedProperty (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/delegatedProperty" -} - -task codegen_blackbox_delegatedProperty_local (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/delegatedProperty/local" -} - -task codegen_blackbox_delegatedProperty_provideDelegate (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/delegatedProperty/provideDelegate" -} - -task codegen_blackbox_delegation (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/delegation" -} - -task codegen_blackbox_destructuringDeclInLambdaParam (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/destructuringDeclInLambdaParam" -} - -task codegen_blackbox_diagnostics_functions_inference (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/diagnostics/functions/inference" -} - -task codegen_blackbox_diagnostics_functions_invoke_onObjects (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/diagnostics/functions/invoke/onObjects" -} - -task codegen_blackbox_diagnostics_functions_tailRecursion (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/diagnostics/functions/tailRecursion" -} - -task codegen_blackbox_diagnostics_vararg (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/diagnostics/vararg" -} - -task codegen_blackbox_elvis (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/elvis" -} - -task codegen_blackbox_enum (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/enum" -} - -task codegen_blackbox_evaluate (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/evaluate" -} - -task codegen_blackbox_exclExcl (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/exclExcl" -} - -task codegen_blackbox_extensionFunctions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/extensionFunctions" -} - -task codegen_blackbox_extensionProperties (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/extensionProperties" -} - -task codegen_blackbox_external (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/external" -} - -task codegen_blackbox_fakeOverride (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/fakeOverride" -} - -task codegen_blackbox_fieldRename (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/fieldRename" -} - -task codegen_blackbox_finally (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/finally" -} - -task codegen_blackbox_fullJdk (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/fullJdk" -} - -task codegen_blackbox_fullJdk_native (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/fullJdk/native" -} - -task codegen_blackbox_fullJdk_regressions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/fullJdk/regressions" -} - -task codegen_blackbox_functions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/functions" -} - -task codegen_blackbox_functions_functionExpression (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/functions/functionExpression" -} - -task codegen_blackbox_functions_invoke (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/functions/invoke" -} - -task codegen_blackbox_functions_localFunctions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/functions/localFunctions" -} - -task codegen_blackbox_hashPMap (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/hashPMap" -} - -task codegen_blackbox_ieee754 (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ieee754" -} - -task codegen_blackbox_increment (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/increment" -} - -task codegen_blackbox_innerNested (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/innerNested" -} - -task codegen_blackbox_innerNested_superConstructorCall (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/innerNested/superConstructorCall" -} - -task codegen_blackbox_instructions_swap (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/instructions/swap" -} - -task codegen_blackbox_intrinsics (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/intrinsics" -} - -task codegen_blackbox_javaInterop (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/javaInterop" -} - -task codegen_blackbox_javaInterop_generics (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/javaInterop/generics" -} - -task codegen_blackbox_javaInterop_notNullAssertions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/javaInterop/notNullAssertions" -} - -task codegen_blackbox_javaInterop_objectMethods (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/javaInterop/objectMethods" -} - -task codegen_blackbox_jdk (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/jdk" -} - -task codegen_blackbox_jvmField (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/jvmField" -} - -task codegen_blackbox_jvmName (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/jvmName" -} - -task codegen_blackbox_jvmName_fileFacades (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/jvmName/fileFacades" -} - -task codegen_blackbox_jvmOverloads (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/jvmOverloads" -} - -task codegen_blackbox_jvmStatic (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/jvmStatic" -} - -task codegen_blackbox_labels (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/labels" -} - -task codegen_blackbox_lazyCodegen (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/lazyCodegen" -} - -task codegen_blackbox_lazyCodegen_optimizations (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/lazyCodegen/optimizations" -} - -task codegen_blackbox_localClasses (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/localClasses" -} - -task codegen_blackbox_mangling (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/mangling" -} - -task codegen_blackbox_multiDecl (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl" -} - -task codegen_blackbox_multiDecl_forIterator (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forIterator" -} - -task codegen_blackbox_multiDecl_forIterator_longIterator (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forIterator/longIterator" -} - -task codegen_blackbox_multiDecl_forRange (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange" -} - -task codegen_blackbox_multiDecl_forRange_explicitRangeTo (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/explicitRangeTo" -} - -task codegen_blackbox_multiDecl_forRange_explicitRangeTo_int (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/explicitRangeTo/int" -} - -task codegen_blackbox_multiDecl_forRange_explicitRangeTo_long (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/explicitRangeTo/long" -} - -task codegen_blackbox_multiDecl_forRange_explicitRangeToWithDot (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/explicitRangeToWithDot" -} - -task codegen_blackbox_multiDecl_forRange_explicitRangeToWithDot_int (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/explicitRangeToWithDot/int" -} - -task codegen_blackbox_multiDecl_forRange_explicitRangeToWithDot_long (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/explicitRangeToWithDot/long" -} - -task codegen_blackbox_multiDecl_forRange_int (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/int" -} - -task codegen_blackbox_multiDecl_forRange_long (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multiDecl/forRange/long" -} - -task codegen_blackbox_multifileClasses (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multifileClasses" -} - -task codegen_blackbox_multifileClasses_optimized (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/multifileClasses/optimized" -} - -task codegen_blackbox_nonLocalReturns (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/nonLocalReturns" -} - -task codegen_blackbox_objectIntrinsics (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/objectIntrinsics" -} - -task codegen_blackbox_objects (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/objects" -} - -task codegen_blackbox_operatorConventions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/operatorConventions" -} - -task codegen_blackbox_operatorConventions_compareTo (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/operatorConventions/compareTo" -} - -task codegen_blackbox_package (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/package" -} - -task codegen_blackbox_platformTypes_primitives (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/platformTypes/primitives" -} - -task codegen_blackbox_primitiveTypes (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/primitiveTypes" -} - -task codegen_blackbox_private (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/private" -} - -task codegen_blackbox_privateConstructors (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/privateConstructors" -} - -task codegen_blackbox_properties (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/properties" -} - -task codegen_blackbox_properties_const (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/properties/const" -} - -task codegen_blackbox_properties_lateinit (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/properties/lateinit" -} - -task codegen_blackbox_publishedApi (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/publishedApi" -} - -task codegen_blackbox_ranges (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges" -} - -task codegen_blackbox_ranges_contains (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges/contains" -} - -task codegen_blackbox_ranges_expression (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges/expression" -} - -task codegen_blackbox_ranges_forInDownTo (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges/forInDownTo" -} - -task codegen_blackbox_ranges_forInIndices (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges/forInIndices" -} - -task codegen_blackbox_ranges_literal (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges/literal" -} - -task codegen_blackbox_ranges_nullableLoopParameter (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/ranges/nullableLoopParameter" -} - -task codegen_blackbox_reflection_annotations (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/annotations" -} - -task codegen_blackbox_reflection_call (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/call" -} - -task codegen_blackbox_reflection_call_bound (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/call/bound" -} - -task codegen_blackbox_reflection_callBy (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/callBy" -} - -task codegen_blackbox_reflection_classes (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/classes" -} - -task codegen_blackbox_reflection_classLiterals (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/classLiterals" -} - -task codegen_blackbox_reflection_constructors (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/constructors" -} - -task codegen_blackbox_reflection_createAnnotation (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/createAnnotation" -} - -task codegen_blackbox_reflection_enclosing (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/enclosing" -} - -task codegen_blackbox_reflection_functions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/functions" -} - -task codegen_blackbox_reflection_genericSignature (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/genericSignature" -} - -task codegen_blackbox_reflection_isInstance (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/isInstance" -} - -task codegen_blackbox_reflection_kClassInAnnotation (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/kClassInAnnotation" -} - -task codegen_blackbox_reflection_lambdaClasses (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/lambdaClasses" -} - -task codegen_blackbox_reflection_mapping (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/mapping" -} - -task codegen_blackbox_reflection_mapping_fakeOverrides (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/mapping/fakeOverrides" -} - -task codegen_blackbox_reflection_mapping_jvmStatic (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/mapping/jvmStatic" -} - -task codegen_blackbox_reflection_mapping_types (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/mapping/types" -} - -task codegen_blackbox_reflection_methodsFromAny (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/methodsFromAny" -} - -task codegen_blackbox_reflection_modifiers (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/modifiers" -} - -task codegen_blackbox_reflection_multifileClasses (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/multifileClasses" -} - -task codegen_blackbox_reflection_noReflectAtRuntime (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/noReflectAtRuntime" -} - -task codegen_blackbox_reflection_noReflectAtRuntime_methodsFromAny (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/noReflectAtRuntime/methodsFromAny" -} - -task codegen_blackbox_reflection_parameters (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/parameters" -} - -task codegen_blackbox_reflection_properties (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/properties" -} - -task codegen_blackbox_reflection_properties_accessors (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/properties/accessors" -} - -task codegen_blackbox_reflection_specialBuiltIns (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/specialBuiltIns" -} - -task codegen_blackbox_reflection_supertypes (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/supertypes" -} - -task codegen_blackbox_reflection_typeParameters (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/typeParameters" -} - -task codegen_blackbox_reflection_types (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/types" -} - -task codegen_blackbox_reflection_types_createType (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/types/createType" -} - -task codegen_blackbox_reflection_types_subtyping (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reflection/types/subtyping" -} - -task codegen_blackbox_regressions (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/regressions" -} - -task codegen_blackbox_reified (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reified" -} - -task codegen_blackbox_reified_arraysReification (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/reified/arraysReification" -} - -task codegen_blackbox_safeCall (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/safeCall" -} - -task codegen_blackbox_sam_constructors (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/sam/constructors" -} - -task codegen_blackbox_sealed (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/sealed" -} - -task codegen_blackbox_secondaryConstructors (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/secondaryConstructors" -} - -task codegen_blackbox_smap (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/smap" -} - -task codegen_blackbox_smartCasts (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/smartCasts" -} - -task codegen_blackbox_specialBuiltins (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/specialBuiltins" -} - -task codegen_blackbox_statics (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/statics" -} - -task codegen_blackbox_storeStackBeforeInline (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/storeStackBeforeInline" -} - -task codegen_blackbox_strings (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/strings" -} - -task codegen_blackbox_super (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/super" -} - -task codegen_blackbox_synchronized (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/synchronized" -} - -task codegen_blackbox_syntheticAccessors (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/syntheticAccessors" -} - -task codegen_blackbox_toArray (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/toArray" -} - -task codegen_blackbox_topLevelPrivate (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/topLevelPrivate" -} - -task codegen_blackbox_traits (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/traits" -} - -task codegen_blackbox_typealias (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/typealias" -} - -task codegen_blackbox_typeInfo (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/typeInfo" -} - -task codegen_blackbox_typeMapping (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/typeMapping" -} - -task codegen_blackbox_unaryOp (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/unaryOp" -} - -task codegen_blackbox_unit (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/unit" -} - -task codegen_blackbox_vararg (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/vararg" -} - -task codegen_blackbox_when (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/when" -} - -task codegen_blackbox_when_enumOptimization (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/when/enumOptimization" -} - -task codegen_blackbox_when_stringOptimization (type: RunExternalTestGroup) { - groupDirectory = "codegen/blackbox/when/stringOptimization" -} - - -task daily { - dependsOn(codegen_blackbox_annotations) -} - -task run() { - dependsOn(tasks.withType(RunExternalTestGroup).matching { it.enabled }) -} diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy index 713c99edbc0..569fff6f663 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy @@ -274,7 +274,7 @@ class RunExternalTestGroup extends RunKonanTest { createOutputDirectory() // Form the test list. - def ktFiles = project.file(groupDirectory).listFiles(new FileFilter() { + List ktFiles = project.file(groupDirectory).listFiles(new FileFilter() { @Override boolean accept(File pathname) { pathname.isFile() && pathname.name.endsWith(".kt") @@ -292,7 +292,7 @@ class RunExternalTestGroup extends RunKonanTest { statistics = new Statistics() ktFiles.each { source = project.relativePath(it) - println("TEST: $it.name ($statistics.total/$ktFiles.size, passed: $statistics.passed, skipped: $statistics.skipped)") + println("TEST: $it.name ($statistics.total/${ktFiles.size()}, passed: $statistics.passed, skipped: $statistics.skipped)") if (isEnabledForNativeBackend(source)) { try { super.executeTest() diff --git a/settings.gradle b/settings.gradle index de284fb5fbb..a4cb6759f92 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,4 +7,3 @@ include ':backend.native' include ':runtime' include ':common' include ':backend.native:tests' -include ':backend.native:tests:external'