@@ -34,25 +34,25 @@ dependencies {
34
34
baseline " $group :$coverage_jar_name :$baselineVersion "
35
35
}
36
36
37
- def ijAgentParams (Configuration configuration , boolean branchCoverage ) {
37
+ def ijAgentParams (Configuration configuration , boolean branchCoverage , String ... jvmArgs ) {
38
38
def agentPath = configuration == configurations. head
39
39
? rootProject. file(" dist" ). listFiles(). find { it. name. startsWith(coverage_jar_name) }. absolutePath
40
40
: configuration. find { it. name. startsWith(coverage_jar_name) }. absolutePath
41
41
return [
42
42
" -javaagent:${ agentPath} =${ coverageFile} false false false ${ !branchCoverage} org.joda.* org.apache.commons.*" ,
43
- " -Didea.new.sampling.coverage=true " , " -Didea.new.tracing.coverage=true "
43
+ * jvmArgs
44
44
]
45
45
}
46
46
47
47
def branchCoverage = true
48
48
49
49
task BaselineCoverage (type : JavaExec ) {
50
- configureCompare (it) { ijAgentParams(configurations. baseline, branchCoverage) }
50
+ configureCompareWithNoAgent (it) { ijAgentParams(configurations. baseline, branchCoverage) }
51
51
clear(it)
52
52
}
53
53
54
54
task HeadCoverage (type : JavaExec ) {
55
- configureCompare (it) { ijAgentParams(configurations. head, branchCoverage) }
55
+ configureCompareWithNoAgent (it) { ijAgentParams(configurations. head, branchCoverage) }
56
56
clear(it)
57
57
}
58
58
@@ -66,6 +66,54 @@ task LineVsBranchCoverage(type: JavaExec) {
66
66
clear(it)
67
67
}
68
68
69
+ task CondyCoverage (type : JavaExec ) {
70
+ configureBenchmark(it) {
71
+ ijAgentParams(configurations. head, branchCoverage)
72
+ }
73
+ clear(it)
74
+ }
75
+
76
+ task IndyCoverage (type : JavaExec ) {
77
+ configureBenchmark(it) {
78
+ ijAgentParams(configurations. head, branchCoverage, " -Dcoverage.condy.enable=false" )
79
+ }
80
+ clear(it)
81
+ }
82
+
83
+ task FieldCoverage (type : JavaExec ) {
84
+ configureBenchmark(it) {
85
+ ijAgentParams(configurations. head, branchCoverage, " -Dcoverage.condy.enable=false" , " -Dcoverage.indy.enable=false" )
86
+ }
87
+ clear(it)
88
+ }
89
+
90
+ task OldCoverage (type : JavaExec ) {
91
+ configureBenchmark(it) {
92
+ ijAgentParams(configurations. head, branchCoverage, " -Didea.new.sampling.coverage=false" , " -Didea.new.tracing.coverage=false" )
93
+ }
94
+ clear(it)
95
+ }
96
+
97
+ task IndyVsCondyCoverage {
98
+ configureComparison(it, IndyCoverage , CondyCoverage )
99
+ clear(it)
100
+ }
101
+
102
+ task FieldVsIndyCoverage {
103
+ configureComparison(it, FieldCoverage , IndyCoverage )
104
+ clear(it)
105
+ }
106
+
107
+ task OldVsFieldCoverage {
108
+ configureComparison(it, OldCoverage , FieldCoverage )
109
+ clear(it)
110
+ }
111
+
112
+ task FieldVsCondyCoverage {
113
+ configureComparison(it, FieldCoverage , CondyCoverage )
114
+ clear(it)
115
+ }
116
+
69
117
def clear (Task task ) {
70
118
task. doLast {
71
119
delete(coverageFile)
0 commit comments