[K/N][Test] Add missing annotations required by Gradle 7
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
package org.jetbrains.kotlin
|
package org.jetbrains.kotlin
|
||||||
|
|
||||||
import org.gradle.api.tasks.Input
|
import org.gradle.api.tasks.Input
|
||||||
|
import org.gradle.api.tasks.Optional
|
||||||
|
import org.gradle.api.tasks.Internal
|
||||||
import org.gradle.api.tasks.JavaExec
|
import org.gradle.api.tasks.JavaExec
|
||||||
import org.gradle.api.tasks.TaskAction
|
import org.gradle.api.tasks.TaskAction
|
||||||
import org.gradle.process.ExecResult
|
import org.gradle.process.ExecResult
|
||||||
@@ -31,26 +33,57 @@ import java.util.stream.Collectors
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class RunExternalTestGroup extends JavaExec implements CompilerRunner {
|
class RunExternalTestGroup extends JavaExec implements CompilerRunner {
|
||||||
def platformManager = project.project(":kotlin-native").platformManager
|
private def platformManager = project.project(":kotlin-native").platformManager
|
||||||
def target = platformManager.targetManager(project.testTarget).target
|
private def target = platformManager.targetManager(project.testTarget).target
|
||||||
|
|
||||||
|
@Internal
|
||||||
def dist = UtilsKt.getKotlinNativeDist(project)
|
def dist = UtilsKt.getKotlinNativeDist(project)
|
||||||
|
|
||||||
|
@Input
|
||||||
def enableKonanAssertions = true
|
def enableKonanAssertions = true
|
||||||
|
|
||||||
|
@Input
|
||||||
def verifyIr = true
|
def verifyIr = true
|
||||||
|
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
String outputDirectory = null
|
String outputDirectory = null
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
String goldValue = null
|
String goldValue = null
|
||||||
|
|
||||||
|
@Input
|
||||||
// Checks test's output against gold value and returns true if the output matches the expectation
|
// Checks test's output against gold value and returns true if the output matches the expectation
|
||||||
Function<String, Boolean> outputChecker = { str -> (goldValue == null || goldValue == str) }
|
Function<String, Boolean> outputChecker = { str -> (goldValue == null || goldValue == str) }
|
||||||
|
|
||||||
|
@Input
|
||||||
boolean printOutput = true
|
boolean printOutput = true
|
||||||
|
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
String testData = null
|
String testData = null
|
||||||
|
|
||||||
|
@Input
|
||||||
int expectedExitStatus = 0
|
int expectedExitStatus = 0
|
||||||
|
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
List<String> arguments = null
|
List<String> arguments = null
|
||||||
|
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
List<String> flags = null
|
List<String> flags = null
|
||||||
|
|
||||||
|
@Input
|
||||||
boolean multiRuns = false
|
boolean multiRuns = false
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
List<List<String>> multiArguments = null
|
List<List<String>> multiArguments = null
|
||||||
|
|
||||||
|
@Input
|
||||||
boolean expectedFail = false
|
boolean expectedFail = false
|
||||||
|
|
||||||
|
@Input
|
||||||
boolean compilerMessages = false
|
boolean compilerMessages = false
|
||||||
|
|
||||||
// Uses directory defined in $outputSourceSetName source set
|
// Uses directory defined in $outputSourceSetName source set
|
||||||
@@ -125,6 +158,7 @@ class RunExternalTestGroup extends JavaExec implements CompilerRunner {
|
|||||||
// FIXME: output directory here changes and hence this is not a property
|
// FIXME: output directory here changes and hence this is not a property
|
||||||
String executablePath() { return "$outputDirectory/program.tr" }
|
String executablePath() { return "$outputDirectory/program.tr" }
|
||||||
|
|
||||||
|
@Internal
|
||||||
OutputStream out
|
OutputStream out
|
||||||
|
|
||||||
void runExecutable() {
|
void runExecutable() {
|
||||||
@@ -204,15 +238,20 @@ class RunExternalTestGroup extends JavaExec implements CompilerRunner {
|
|||||||
* 2. Build a final executable from this klibrary.
|
* 2. Build a final executable from this klibrary.
|
||||||
*/
|
*/
|
||||||
@Input
|
@Input
|
||||||
public def enableTwoStageCompilation = false
|
def enableTwoStageCompilation = false
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
def groupDirectory = "."
|
def groupDirectory = "."
|
||||||
|
|
||||||
def ignoredTests = []
|
@Input
|
||||||
|
@Optional
|
||||||
|
List<String> ignoredTests = null
|
||||||
|
|
||||||
|
@Input
|
||||||
|
@Optional
|
||||||
String filter = project.findProperty("filter")
|
String filter = project.findProperty("filter")
|
||||||
|
|
||||||
|
@Internal
|
||||||
def testGroupReporter = new KonanTestGroupReportEnvironment(project)
|
def testGroupReporter = new KonanTestGroupReportEnvironment(project)
|
||||||
|
|
||||||
void parseLanguageFlags(String src) {
|
void parseLanguageFlags(String src) {
|
||||||
|
|||||||
Reference in New Issue
Block a user