diff --git a/.idea/runConfigurations/Generate_Compiler_Tests.xml b/.idea/runConfigurations/Generate_Compiler_Tests.xml
index e800202d2b5..89bc789a6b0 100644
--- a/.idea/runConfigurations/Generate_Compiler_Tests.xml
+++ b/.idea/runConfigurations/Generate_Compiler_Tests.xml
@@ -13,10 +13,12 @@
+
+
\ No newline at end of file
diff --git a/compiler/tests-common/build.gradle.kts b/compiler/tests-common/build.gradle.kts
index 03e52d01823..ea5cf3e271e 100644
--- a/compiler/tests-common/build.gradle.kts
+++ b/compiler/tests-common/build.gradle.kts
@@ -5,7 +5,6 @@ dependencies {
testCompile(project(":core:descriptors"))
testCompile(project(":core:descriptors.jvm"))
testCompile(project(":core:deserialization"))
- testCompile(project(":core:descriptors.runtime"))
testCompile(project(":compiler:util"))
testCompile(project(":compiler:backend"))
testCompile(project(":compiler:frontend"))
diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt
index fd6db333349..25f42f6be51 100644
--- a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt
+++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.jvm.compiler.AbstractJava8WriteSignatureTest
import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8Test
import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8WithFastClassReadingTest
import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJava8UsingJavacTest
-import org.jetbrains.kotlin.jvm.runtime.AbstractJvm8RuntimeDescriptorLoaderTest
import org.jetbrains.kotlin.resolve.calls.AbstractEnhancedSignaturesResolvedCallsTest
fun main(args: Array) {
@@ -74,10 +73,6 @@ fun main(args: Array) {
model("resolvedCalls/enhancedSignatures")
}
- testClass {
- model("loadJava8/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation"))
- }
-
testClass {
model("codegen/java8/compileKotlinAgainstKotlin")
}
diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt
index ce513229675..5d42d213f41 100644
--- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt
+++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt
@@ -38,7 +38,6 @@ import org.jetbrains.kotlin.ir.AbstractIrSourceRangesTestCase
import org.jetbrains.kotlin.ir.AbstractIrTextTestCase
import org.jetbrains.kotlin.jvm.compiler.*
import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJavaUsingJavacTest
-import org.jetbrains.kotlin.jvm.runtime.AbstractJvmRuntimeDescriptorLoaderTest
import org.jetbrains.kotlin.kdoc.AbstractKDocLexerTest
import org.jetbrains.kotlin.modules.xml.AbstractModuleXmlParserTest
import org.jetbrains.kotlin.multiplatform.AbstractMultiPlatformIntegrationTest
@@ -253,11 +252,6 @@ fun main(args: Array) {
model("loadJava/compiledKotlin")
}
- testClass {
- model("loadJava/compiledKotlin")
- model("loadJava/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation"))
- }
-
testClass {
model("loadJava/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
}
diff --git a/core/descriptors.runtime/build.gradle.kts b/core/descriptors.runtime/build.gradle.kts
index cec39c8b83d..8b765ab965a 100644
--- a/core/descriptors.runtime/build.gradle.kts
+++ b/core/descriptors.runtime/build.gradle.kts
@@ -1,20 +1,33 @@
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
apply { plugin("kotlin") }
-jvmTarget = "1.6"
-javaHome = rootProject.extra["JDK_16"] as String
-
dependencies {
- compile(project(":core:util.runtime"))
- compile(project(":core:descriptors"))
- compile(project(":core:descriptors.jvm"))
+ compileOnly(project(":core:util.runtime"))
+ compileOnly(project(":core:descriptors"))
+ compileOnly(project(":core:descriptors.jvm"))
+
+ testCompile(projectTests(":compiler:tests-common"))
+ testCompile(projectTests(":generators:test-generator"))
}
sourceSets {
"main" { projectDefault() }
- "test" {}
+ "test" { projectDefault() }
}
-tasks.withType {
+val compileJava by tasks.getting(JavaCompile::class) {
sourceCompatibility = "1.6"
targetCompatibility = "1.6"
}
+
+val compileKotlin by tasks.getting(KotlinCompile::class) {
+ kotlinOptions.jvmTarget = "1.6"
+ kotlinOptions.jdkHome = rootProject.extra["JDK_16"] as String
+}
+
+val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateRuntimeDescriptorTestsKt")
+
+projectTest {
+ workingDir = rootDir
+}
diff --git a/core/descriptors.runtime/tests/org/jetbrains/kotlin/generators/tests/GenerateRuntimeDescriptorTests.kt b/core/descriptors.runtime/tests/org/jetbrains/kotlin/generators/tests/GenerateRuntimeDescriptorTests.kt
new file mode 100644
index 00000000000..4036fc3da31
--- /dev/null
+++ b/core/descriptors.runtime/tests/org/jetbrains/kotlin/generators/tests/GenerateRuntimeDescriptorTests.kt
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2010-2017 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.kotlin.generators.tests
+
+import org.jetbrains.kotlin.generators.tests.generator.testGroup
+import org.jetbrains.kotlin.jvm.runtime.AbstractJvm8RuntimeDescriptorLoaderTest
+import org.jetbrains.kotlin.jvm.runtime.AbstractJvmRuntimeDescriptorLoaderTest
+
+fun main(args: Array) {
+ System.setProperty("java.awt.headless", "true")
+
+ testGroup("core/descriptors.runtime/tests", "compiler/testData") {
+ testClass {
+ model("loadJava/compiledKotlin")
+ model("loadJava/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation"))
+ }
+
+ testClass {
+ model("loadJava8/compiledJava", extension = "java")
+ }
+ }
+}
diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvm8RuntimeDescriptorLoaderTest.kt b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvm8RuntimeDescriptorLoaderTest.kt
similarity index 100%
rename from compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvm8RuntimeDescriptorLoaderTest.kt
rename to core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvm8RuntimeDescriptorLoaderTest.kt
diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt
similarity index 99%
rename from compiler/tests-common/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt
rename to core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt
index fb1d801e0d3..8f90af6959b 100644
--- a/compiler/tests-common/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt
+++ b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/AbstractJvmRuntimeDescriptorLoaderTest.kt
@@ -1,5 +1,5 @@
/*
- * Copyright 2010-2016 JetBrains s.r.o.
+ * Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java
similarity index 96%
rename from compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java
rename to core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java
index fa019c8deae..00226fe6596 100644
--- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java
+++ b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java
@@ -33,7 +33,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class Jvm8RuntimeDescriptorLoaderTestGenerated extends AbstractJvm8RuntimeDescriptorLoaderTest {
public void testAllFilesPresentInCompiledJava() throws Exception {
- KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true, "sam", "kotlinSignature/propagation");
+ KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true);
}
@TestMetadata("InnerClassTypeAnnotation.java")
diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java
similarity index 100%
rename from compiler/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java
rename to core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java
diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt
index 735aa3bd7bb..815b752c546 100755
--- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt
+++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt
@@ -33,15 +33,10 @@ import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidBoxTest
import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidBytecodeShapeTest
import org.jetbrains.kotlin.android.synthetic.test.AbstractAndroidSyntheticPropertyDescriptorTest
import org.jetbrains.kotlin.annotation.AbstractAnnotationProcessorBoxTest
-import org.jetbrains.kotlin.checkers.*
-import org.jetbrains.kotlin.checkers.javac.AbstractJavacForeignJava8AnnotationsTest
-import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTest
-import org.jetbrains.kotlin.codegen.AbstractBytecodeTextTest
-import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstKotlinTest
-import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest
-import org.jetbrains.kotlin.codegen.ir.AbstractIrBlackBoxCodegenTest
-import org.jetbrains.kotlin.codegen.ir.AbstractIrBlackBoxInlineCodegenTest
-import org.jetbrains.kotlin.codegen.ir.AbstractIrCompileKotlinAgainstInlineKotlinTest
+import org.jetbrains.kotlin.checkers.AbstractJavaAgainstKotlinBinariesCheckerTest
+import org.jetbrains.kotlin.checkers.AbstractJavaAgainstKotlinSourceCheckerTest
+import org.jetbrains.kotlin.checkers.AbstractJsCheckerTest
+import org.jetbrains.kotlin.checkers.AbstractPsiCheckerTest
import org.jetbrains.kotlin.findUsages.AbstractFindUsagesTest
import org.jetbrains.kotlin.findUsages.AbstractKotlinFindUsagesWithLibraryTest
import org.jetbrains.kotlin.formatter.AbstractFormatterTest
@@ -146,20 +141,11 @@ import org.jetbrains.kotlin.jps.build.*
import org.jetbrains.kotlin.jps.build.android.AbstractAndroidJpsTestCase
import org.jetbrains.kotlin.jps.incremental.AbstractJsProtoComparisonTest
import org.jetbrains.kotlin.jps.incremental.AbstractJvmProtoComparisonTest
-import org.jetbrains.kotlin.js.test.AbstractDceTest
-import org.jetbrains.kotlin.js.test.AbstractJsLineNumberTest
-import org.jetbrains.kotlin.js.test.semantics.*
-import org.jetbrains.kotlin.jvm.compiler.AbstractJava8WriteSignatureTest
-import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8Test
-import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8WithFastClassReadingTest
-import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJava8UsingJavacTest
-import org.jetbrains.kotlin.jvm.runtime.AbstractJvm8RuntimeDescriptorLoaderTest
import org.jetbrains.kotlin.kapt3.test.AbstractClassFileToSourceStubConverterTest
import org.jetbrains.kotlin.kapt3.test.AbstractKotlinKaptContextTest
import org.jetbrains.kotlin.noarg.AbstractBlackBoxCodegenTestForNoArg
import org.jetbrains.kotlin.noarg.AbstractBytecodeListingTestForNoArg
import org.jetbrains.kotlin.psi.patternMatching.AbstractPsiUnifierTest
-import org.jetbrains.kotlin.resolve.calls.AbstractEnhancedSignaturesResolvedCallsTest
import org.jetbrains.kotlin.samWithReceiver.AbstractSamWithReceiverScriptTest
import org.jetbrains.kotlin.samWithReceiver.AbstractSamWithReceiverTest
import org.jetbrains.kotlin.search.AbstractAnnotatedMembersSearchTest