[Native][tests] Don't treat any compiler test task as up-to-date
There are number of problems with up-to-date checks in tests, leading to a test binary not being rebuilt or rerun when a developer expects it to. Things became worse after updating to Gradle 7+: test binary run tasks are considered up-to-date if the test data has been changed, even after clean. Even before Gradle 7+, we've observed other similar undesirable effects: for example, if the compiler has been changed, tasks building test binaries are still up-to-date. So it was decided to workaround all possible similar problems by forcing all test tasks in the :native:native.tests project to be not up-to-date. This project should contain only test tasks, so this workaround seems pretty natural -- it is just "tests aren't up-to-date".
This commit is contained in:
@@ -62,7 +62,13 @@ enum class TestProperty(shortName: String) {
|
||||
fun Test.setUpBlackBoxTest(tag: String) {
|
||||
if (kotlinBuildProperties.isKotlinNativeEnabled) {
|
||||
dependsOn(":kotlin-native:dist")
|
||||
|
||||
workingDir = rootDir
|
||||
outputs.upToDateWhen {
|
||||
// Don't treat any test task as up-to-date, no matter what.
|
||||
// Note: this project should contain only test tasks, including ones that build binaries, and ones that run binaries.
|
||||
false
|
||||
}
|
||||
|
||||
maxHeapSize = "6G" // Extra heap space for Kotlin/Native compiler.
|
||||
jvmArgs("-XX:MaxJavaStackTraceDepth=1000000") // Effectively remove the limit for the amount of stack trace elements in Throwable.
|
||||
|
||||
Reference in New Issue
Block a user