diff --git a/instrument/src/main/java/edu/berkeley/cs/jqf/instrument/InstrumentingClassLoader.java b/instrument/src/main/java/edu/berkeley/cs/jqf/instrument/InstrumentingClassLoader.java index c70223c95..b582657dc 100644 --- a/instrument/src/main/java/edu/berkeley/cs/jqf/instrument/InstrumentingClassLoader.java +++ b/instrument/src/main/java/edu/berkeley/cs/jqf/instrument/InstrumentingClassLoader.java @@ -56,7 +56,7 @@ public InstrumentingClassLoader(String[] paths, ClassLoader parent) throws Malfo this(stringsToUrls(paths), parent); } - private static URL[] stringsToUrls(String[] paths) throws MalformedURLException { + public static URL[] stringsToUrls(String[] paths) throws MalformedURLException { URL[] urls = new URL[paths.length]; for (int i = 0; i < paths.length; i++) { urls[i] = new File(paths[i]).toURI().toURL(); diff --git a/maven-plugin/src/main/java/edu/berkeley/cs/jqf/plugin/FuzzGoal.java b/maven-plugin/src/main/java/edu/berkeley/cs/jqf/plugin/FuzzGoal.java index 36cd42525..8c456eed6 100644 --- a/maven-plugin/src/main/java/edu/berkeley/cs/jqf/plugin/FuzzGoal.java +++ b/maven-plugin/src/main/java/edu/berkeley/cs/jqf/plugin/FuzzGoal.java @@ -32,6 +32,7 @@ import java.io.IOException; import java.io.PrintStream; import java.net.MalformedURLException; +import java.net.URLClassLoader; import java.time.Duration; import java.time.format.DateTimeParseException; import java.util.List; @@ -51,6 +52,8 @@ import org.apache.maven.project.MavenProject; import org.junit.runner.Result; +import static edu.berkeley.cs.jqf.instrument.InstrumentingClassLoader.stringsToUrls; + /** * Maven plugin for feedback-directed fuzzing using JQF. * @@ -142,6 +145,19 @@ public class FuzzGoal extends AbstractMojo { @Parameter(property="blind") private boolean blind; + /** + * Whether to disable code-coverage instrumentation. + * + *
Disabling instrumentation speeds up test case execution, but + * provides no feedback about code coverage in the status screen and + * to the fuzzing guidance.
+ * + *This setting only makes sense when used with {@code -Dblind}.
+ * + */ + @Parameter(property="noCov") + private boolean disableCoverage; + /** * The name of the input directory containing seed files. * @@ -263,9 +279,16 @@ public void execute() throws MojoExecutionException, MojoFailureException { try { List