Also exclude test coverage from instrumentation

This commit is contained in:
Tyler Benson 2019-01-04 11:08:21 -08:00
parent 6d7415fed2
commit c18b299606
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,6 @@
apply from: "${rootDir}/gradle/java.gradle" apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/test-with-scala.gradle" apply from: "${rootDir}/gradle/test-with-scala.gradle"
excludedClassesConverage += ['*']
dependencies { dependencies {
testCompile project(':dd-trace-api') testCompile project(':dd-trace-api')
testCompile project(':dd-trace-ot') testCompile project(':dd-trace-ot')

View File

@ -4,7 +4,9 @@ apply plugin: 'groovy'
apply from: "$rootDir/gradle/checkstyle.gradle" apply from: "$rootDir/gradle/checkstyle.gradle"
apply from: "$rootDir/gradle/codenarc.gradle" apply from: "$rootDir/gradle/codenarc.gradle"
def applyCodeCoverage = !project.plugins.hasPlugin('com.github.johnrengelman.shadow') def applyCodeCoverage = !(project.plugins.hasPlugin('com.github.johnrengelman.shadow')
|| project.path.startsWith(":dd-java-agent:instrumentation:"))
if (applyCodeCoverage) { if (applyCodeCoverage) {
apply from: "$rootDir/gradle/jacoco.gradle" apply from: "$rootDir/gradle/jacoco.gradle"
} }
@ -234,7 +236,7 @@ for (def env : System.getenv().entrySet()) {
description "Runs $clonedTask.name under java ${javaName}" description "Runs $clonedTask.name under java ${javaName}"
executable = javaPath executable = javaPath
onlyIf { isJavaVersionAllowed(javaVersion) && isTestingEnabled(javaName) } onlyIf { isJavaVersionAllowed(javaVersion) && isTestingEnabled(javaName) }
if(applyCodeCoverage) { if (applyCodeCoverage) {
jacoco { jacoco {
// Disable jacoco for additional JVM tests to speed things up a bit // Disable jacoco for additional JVM tests to speed things up a bit
enabled = false enabled = false