Skip to content

Commit

Permalink
Merge pull request #113 from cqse/update_jacoco_085
Browse files Browse the repository at this point in the history
Update JaCoCo to 0.8.5
  • Loading branch information
karottenreibe authored Mar 5, 2020
2 parents 02f2b33 + f30503b commit a98435d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ We use [semantic versioning][semver]
- [feature] Added `coverage-via-http` option for testwise mode
- [feature] Added `teamscale-revision` option to supply VCS revision instead of branch and timestamp
- [feature] Added `/revision` HTTP endpoint for testwise mode
- [feature] Updated JaCoCo to 0.8.5
- [fix] Significantly reduced memory footprint
- [fix] `--run-all-tests` doesn't run any tests at all
- [fix] test-wise coverage report incorrect for classes in default package
Expand Down
18 changes: 10 additions & 8 deletions agent/src/main/java/com/teamscale/jacoco/agent/AgentBase.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package com.teamscale.jacoco.agent;

import static spark.Spark.port;
import static spark.Spark.stop;

import java.lang.instrument.Instrumentation;

import org.jacoco.agent.rt.RT;
import org.slf4j.Logger;

import com.teamscale.client.HttpUtils;
import com.teamscale.jacoco.agent.options.AgentOptionParseException;
import com.teamscale.jacoco.agent.options.AgentOptions;
import com.teamscale.jacoco.agent.options.AgentOptionsParser;
import com.teamscale.jacoco.agent.util.LoggingUtils;
import org.jacoco.agent.rt.RT;
import org.slf4j.Logger;

import java.lang.instrument.Instrumentation;

import static spark.Spark.port;
import static spark.Spark.stop;

/**
* Base class for agent implementations. Handles logger shutdown, store creation and instantiation of the {@link
Expand Down Expand Up @@ -85,7 +86,7 @@ public static void premain(String options, Instrumentation instrumentation) thro
HttpUtils.setShouldValidateSsl(agentOptions.shouldValidateSsl());

logger.info("Starting JaCoCo's agent");
org.jacoco.agent.rt.internal_035b120.PreMain.premain(agentOptions.createJacocoAgentOptions(), instrumentation);
org.jacoco.agent.rt.internal_43f5073.PreMain.premain(agentOptions.createJacocoAgentOptions(), instrumentation);

AgentBase agent = agentOptions.createAgent(instrumentation);
agent.registerShutdownHook();
Expand All @@ -107,5 +108,6 @@ private void registerShutdownHook() {

/** Called when the shutdown hook is triggered. */
protected void prepareShutdown() {
// Template method to be overridden by subclasses.
}
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ ext {

// When upgrading JaCoCo to a newer version make sure to
// check the comment in the AnalyzerCache.java and CachingInstructionsBuilder.java
// and update the internal_xxxxxx hash included in the PreMain package name in AgentBase.kt.
jacocoVersion = '0.8.4'
// and update the internal_xxxxxx hash included in the PreMain package name in AgentBase.java.
jacocoVersion = '0.8.5'
log4jVersion = '2.8.2'

// For deploying Jars you have to configure SSH keys locally and on the CQSE share server.
Expand Down

0 comments on commit a98435d

Please sign in to comment.