Skip to content

Commit

Permalink
Avoid trying to generate HTML reports when no tests have been run
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Nov 23, 2024
1 parent 0ce9aca commit 967e798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions documentation/documentation.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ tasks {

generateOpenTestHtmlReport {
mustRunAfter(consoleLauncherTest)
inputs.files(consoleLauncherTestEventXmlFiles).withPathSensitivity(RELATIVE).skipWhenEmpty()
argumentProviders += CommandLineArgumentProvider {
consoleLauncherTestEventXmlFiles.files.map { it.absolutePath }.toList()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import com.gradle.develocity.agent.gradle.internal.test.PredictiveTestSelectionConfigurationInternal
import com.gradle.develocity.agent.gradle.test.PredictiveTestSelectionMode
import org.gradle.api.tasks.PathSensitivity.NONE
import org.gradle.api.tasks.PathSensitivity.RELATIVE
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.internal.os.OperatingSystem
Expand Down Expand Up @@ -41,7 +41,8 @@ val generateOpenTestHtmlReport by tasks.registering(JavaExec::class) {
abstract class HtmlReportParameters : CommandLineArgumentProvider {

@get:InputFiles
@get:PathSensitive(NONE)
@get:PathSensitive(RELATIVE)
@get:SkipWhenEmpty
abstract val eventXmlFiles: ConfigurableFileCollection

@get:OutputFile
Expand Down

0 comments on commit 967e798

Please sign in to comment.