Examples of AgentOptions


Examples of org.jacoco.core.runtime.AgentOptions

  /**
   * Create default agent options
   */
  protected AbstractCoverageTask() {
    agentOptions = new AgentOptions();
    enabled = true;
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

  private TcpServerController controller;

  @Before
  public void setup() throws Exception {
    options = new AgentOptions();
    runtime = new StubRuntime();
    logger = new ExceptionRecorder();
    serverSocket = new MockServerSocket();
    controller = new TcpServerController(logger) {
      @Override
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

   *
   * @param options
   *            agent options as text string
   */
  public JacocoAgent(String options, IExceptionLogger logger) {
    this(new AgentOptions(options), logger);
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

  private ClassLoader classLoader;

  @Before
  public void setup() {
    recorder = new ExceptionRecorder();
    options = new AgentOptions();
    classLoader = getClass().getClassLoader();
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

  private ClassLoader classLoader;

  @Before
  public void setup() {
    recorder = new ExceptionRecorder();
    options = new AgentOptions();
    classLoader = getClass().getClassLoader();
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

  /**
   * Create default agent options
   */
  protected AbstractCoverageTask() {
    super();
    agentOptions = new AgentOptions();
    enabled = true;
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

      ILaunchConfiguration config) throws CoreException {
    return new AdjustedLaunchConfiguration(getArgument(serverPort), config);
  }

  protected String getArgument(int serverPort) throws CoreException {
    final AgentOptions options = new AgentOptions();
    options.setIncludes(preferences.getAgentIncludes());
    options.setExcludes(preferences.getAgentExcludes());
    options.setExclClassloader(preferences.getAgentExclClassloader());
    options.setOutput(AgentOptions.OutputMode.tcpclient);
    options.setPort(serverPort);
    return quote(options.getVMArgument(getAgentFile()));
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

   * @throws CoreException
   *           may be thrown by implementations
   */
  private void addCoverageAgent(ILaunchConfigurationWorkingCopy workingcopy,
      ICoverageLaunch launch) throws CoreException {
    final AgentOptions options = new AgentOptions();
    final ICorePreferences preferences = EclEmmaCorePlugin.getInstance()
        .getPreferences();
    options.setIncludes(preferences.getAgentIncludes());
    options.setExcludes(preferences.getAgentExcludes());
    options.setExclClassloader(preferences.getAgentExclClassloader());
    options.setDestfile(launch.getExecutionDataFile().toOSString());
    try {
      final URL agentfileurl = FileLocator.toFileURL(AgentJar.getResource());
      final File agentfile = new Path(agentfileurl.getPath()).toFile();
      addVMArgument(workingcopy, options.getVMArgument(agentfile));
    } catch (IOException e) {
      throw new CoreException(
          EclEmmaStatus.NO_LOCAL_AGENTJAR_ERROR.getStatus(e));
    }
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

   *
   * @param options
   *            agent options as text string
   */
  public JacocoAgent(final String options, final IExceptionLogger logger) {
    this(new AgentOptions(options), logger);
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

        .get(AGENT_ARTIFACT_NAME);
    return jacocoAgentArtifact.getFile();
  }

  private AgentOptions createAgentOptions() {
    final AgentOptions agentOptions = new AgentOptions();
    final String destPath = destFile.getAbsolutePath();
    agentOptions.setDestfile(destPath);
    if (append != null) {
      agentOptions.setAppend(append.booleanValue());
    }
    if (getIncludes() != null && !getIncludes().isEmpty()) {
      String agentIncludes = StringUtils.join(getIncludes().iterator(),
          ":");
      agentOptions.setIncludes(agentIncludes);
    }
    if (getExcludes() != null && !getExcludes().isEmpty()) {
      String agentExcludes = StringUtils.join(getExcludes().iterator(),
          ":");
      agentOptions.setExcludes(agentExcludes);
    }
    if (exclClassLoaders != null) {
      agentOptions.setExclClassloader(exclClassLoaders);
    }
    if (sessionId != null) {
      agentOptions.setSessionId(sessionId);
    }
    if (dumpOnExit != null) {
      agentOptions.setDumpOnExit(dumpOnExit.booleanValue());
    }
    if (output != null) {
      agentOptions.setOutput(output);
    }
    if (address != null) {
      agentOptions.setAddress(address);
    }
    if (port != null) {
      agentOptions.setPort(port.intValue());
    }
    return agentOptions;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.