[ 
https://issues.apache.org/jira/browse/BEAM-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734362#comment-16734362
 ] 

Michael Luckey commented on BEAM-6301:
--------------------------------------

Not sure about the expectations here, so I probably do not understand the issue.

First, I assume the task to be jacocoTestReport. That tasks has no dependency 
on test tasks [1]. It just uses data collected by an - previously or 
simultaneously - executed test run.

Now beam disabled the automatic instrumentation [2], which means coverage data 
is only collected, iff jacocoTestReport is run.

So either we run
{noformat}
./gradlew test jacocoTestReport
{noformat}

resp
{noformat}
./gradlew :(beam-sdks-java-core:test :beam-sdks-java-core:jacocoTestReport
{noformat}
or do you want to add an explicit dependency along the line
{noformat}
jacocoTestReport.dependsOn test
{noformat}
? Need to be adapted for the multi project build, of course...

[1] https://github.com/gradle/gradle/issues/2921

[2] 
https://github.com/apache/beam/blob/master/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy#L292-L297

> gradle jacoco config is broken
> ------------------------------
>
>                 Key: BEAM-6301
>                 URL: https://issues.apache.org/jira/browse/BEAM-6301
>             Project: Beam
>          Issue Type: Bug
>          Components: build-system
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Major
>
> This should run tests and generate a coverage report:
> {code}
> ./gradlew jacocoCoverageReport
> {code}
> But the task does not cause tests to run. It is likely due to the ordering or 
> organization inside BeamModulePlugin.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to