[Gradle] Check if configuration cache was stored in JS CoCa tests
This commit is contained in:
committed by
Space Team
parent
89811f8d95
commit
51b011706b
+6
-2
@@ -61,7 +61,9 @@ abstract class AbstractJsConfigurationCacheIT(protected val irBackend: Boolean)
|
|||||||
@GradleTest
|
@GradleTest
|
||||||
fun testBrowserDistributionOnIdeaPropertyChange(gradleVersion: GradleVersion) {
|
fun testBrowserDistributionOnIdeaPropertyChange(gradleVersion: GradleVersion) {
|
||||||
project("kotlin-js-browser-project", gradleVersion) {
|
project("kotlin-js-browser-project", gradleVersion) {
|
||||||
build(":app:build")
|
build(":app:build") {
|
||||||
|
assertConfigurationCacheStored()
|
||||||
|
}
|
||||||
// check IdeaPropertiesEvaluator for the logic
|
// check IdeaPropertiesEvaluator for the logic
|
||||||
build(":app:build", "-Didea.version=2020.1") {
|
build(":app:build", "-Didea.version=2020.1") {
|
||||||
assertConfigurationCacheReused()
|
assertConfigurationCacheReused()
|
||||||
@@ -99,7 +101,9 @@ abstract class AbstractJsConfigurationCacheIT(protected val irBackend: Boolean)
|
|||||||
@GradleTest
|
@GradleTest
|
||||||
fun testNodeJsOnIdeaPropertyChange(gradleVersion: GradleVersion) {
|
fun testNodeJsOnIdeaPropertyChange(gradleVersion: GradleVersion) {
|
||||||
project("kotlin-js-nodejs-project", gradleVersion) {
|
project("kotlin-js-nodejs-project", gradleVersion) {
|
||||||
build(":build")
|
build(":build") {
|
||||||
|
assertConfigurationCacheStored()
|
||||||
|
}
|
||||||
// check IdeaPropertiesEvaluator for the logic
|
// check IdeaPropertiesEvaluator for the logic
|
||||||
build(":build", "-Didea.version=2020.1") {
|
build(":build", "-Didea.version=2020.1") {
|
||||||
assertConfigurationCacheReused()
|
assertConfigurationCacheReused()
|
||||||
|
|||||||
+5
-1
@@ -33,7 +33,7 @@ fun TestProject.assertSimpleConfigurationCacheScenarioWorks(
|
|||||||
"Calculating task graph as no configuration cache is available for tasks: ${buildArguments.joinToString(separator = " ")}"
|
"Calculating task graph as no configuration cache is available for tasks: ${buildArguments.joinToString(separator = " ")}"
|
||||||
)
|
)
|
||||||
|
|
||||||
assertOutputContains("Configuration cache entry stored.")
|
assertConfigurationCacheStored()
|
||||||
}
|
}
|
||||||
|
|
||||||
build("clean", buildOptions = buildOptions)
|
build("clean", buildOptions = buildOptions)
|
||||||
@@ -51,6 +51,10 @@ fun TestProject.assertSimpleConfigurationCacheScenarioWorks(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun BuildResult.assertConfigurationCacheStored() {
|
||||||
|
assertOutputContains("Configuration cache entry stored.")
|
||||||
|
}
|
||||||
|
|
||||||
fun BuildResult.assertConfigurationCacheReused() {
|
fun BuildResult.assertConfigurationCacheReused() {
|
||||||
assertOutputContains("Reusing configuration cache.")
|
assertOutputContains("Reusing configuration cache.")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user