Package org.jacoco.core.tools

Examples of org.jacoco.core.tools.ExecFileLoader


  private ExecFileLoader loader;

  @Before
  public void setup() {
    loader = new ExecFileLoader();
  }
View Full Code Here


    client.setDump(dump);
    client.setReset(reset);
    client.setRetryCount(retryCount);

    try {
      final ExecFileLoader loader = client.dump(address, port);
      if (dump) {
        log(format("Dumping execution data to %s",
            destfile.getAbsolutePath()));
        loader.save(destfile, append);
      }
    } catch (final IOException e) {
      throw new BuildException("Unable to dump coverage data", e,
          getLocation());
    }
View Full Code Here

          getLocation());
    }
  }

  private void loadExecutionData() {
    final ExecFileLoader loader = new ExecFileLoader();
    for (final Iterator<?> i = executiondataElement.iterator(); i.hasNext();) {
      final Resource resource = (Resource) i.next();
      log(format("Loading execution data file %s", resource));
      InputStream in = null;
      try {
        in = resource.getInputStream();
        loader.load(in);
      } catch (final IOException e) {
        throw new BuildException(format(
            "Unable to read execution data file %s", resource), e,
            getLocation());
      } finally {
        FileUtils.close(in);
      }
    }
    sessionInfoStore = loader.getSessionInfoStore();
    executionDataStore = loader.getExecutionDataStore();
  }
View Full Code Here

* Test utility to dump class names from exec file.
*/
public class DumpExecClassNames {

  public static void main(String[] args) throws Exception {
    final ExecFileLoader loader = new ExecFileLoader();
    for (String f : args) {
      loader.load(new File(f));
    }
    for (ExecutionData d : loader.getExecutionDataStore().getContents()) {
      System.out.println(d.getName());
    }
  }
View Full Code Here

    if (destfile == null) {
      throw new BuildException("Destination file must be supplied",
          getLocation());
    }

    final ExecFileLoader loader = new ExecFileLoader();

    load(loader);
    save(loader);
  }
View Full Code Here

          "Error while reading code coverage: " + e.getMessage(), e);
    }
  }

  private ExecutionDataStore loadExecutionData() throws IOException {
    final ExecFileLoader loader = new ExecFileLoader();
    loader.load(dataFile);
    return loader.getExecutionDataStore();
  }
View Full Code Here

    }
    return true;
  }

  private void executeMerge() throws MojoExecutionException {
    final ExecFileLoader loader = new ExecFileLoader();

    load(loader);
    save(loader);
  }
View Full Code Here

          + e.getMessage(), e);
    }
  }

  void loadExecutionData() throws MavenReportException {
    final ExecFileLoader loader = new ExecFileLoader();
    try {
      loader.load(getDataFile());
    } catch (final IOException e) {
      throw new MavenReportException(
          "Unable to read execution data file " + getDataFile()
              + ": " + e.getMessage(), e);
    }
    sessionInfoStore = loader.getSessionInfoStore();
    executionDataStore = loader.getExecutionDataStore();
  }
View Full Code Here

    visitor.visitEnd();

  }

  private void loadExecutionData() throws IOException {
    execFileLoader = new ExecFileLoader();
    execFileLoader.load(executionDataFile);
  }
View Full Code Here

    client.setDump(dump);
    client.setReset(reset);
    client.setRetryCount(retryCount);

    try {
      final ExecFileLoader loader = client.dump(address, port);
      if (dump) {
        getLog().info(
            format("Dumping execution data to %s",
                destFile.getAbsolutePath()));
        loader.save(destFile, append);
      }
    } catch (final IOException e) {
      throw new MojoExecutionException("Unable to dump coverage data", e);
    }
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.tools.ExecFileLoader

Copyright © 2018 www.massapicom. 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.