diff options
author | Fabian Meumertzheim <fabian@meumertzhe.im> | 2022-10-10 11:11:26 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2022-10-12 12:16:10 +0200 |
commit | 8c90e8d6ad685ade17476f0e155dbfec981feef1 (patch) | |
tree | dae72d6da83df934d3db5f0d6185027a0712927f /bazel | |
parent | 062a890ab493197ef69d9e55bb609492ffe7bfca (diff) | |
download | jazzer-api-8c90e8d6ad685ade17476f0e155dbfec981feef1.tar.gz |
tests: Remove driver from reproducer compilation classpath
It isn't and shouldn't be needed.
Diffstat (limited to 'bazel')
-rw-r--r-- | bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java index 089598b0..7112604a 100644 --- a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java +++ b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java @@ -172,8 +172,7 @@ public class FuzzTargetTestWrapper { if (JAZZER_CI && verifyCrashReproducer) { try { - verifyCrashReproducer( - outputDir, driverActualPath, apiActualPath, jarActualPath, allowedFindings); + verifyCrashReproducer(outputDir, apiActualPath, jarActualPath, allowedFindings); } catch (Exception e) { e.printStackTrace(); System.exit(1); @@ -274,8 +273,8 @@ public class FuzzTargetTestWrapper { } } - private static void verifyCrashReproducer(String outputDir, String driver, String api, String jar, - Set<String> expectedFindings) throws Exception { + private static void verifyCrashReproducer( + String outputDir, String api, String jar, Set<String> expectedFindings) throws Exception { File source = Files.list(Paths.get(outputDir)) .filter(f -> f.toFile().getName().endsWith(".java")) @@ -285,17 +284,15 @@ public class FuzzTargetTestWrapper { .map(Path::toFile) .orElseThrow( () -> new IllegalStateException("Could not find crash reproducer in " + outputDir)); - String crashReproducer = compile(source, driver, api, jar); + String crashReproducer = compile(source, api, jar); execute(crashReproducer, outputDir, expectedFindings); } - private static String compile(File source, String driver, String api, String jar) - throws IOException { + private static String compile(File source, String api, String jar) throws IOException { JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); try (StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null)) { Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjects(source); - List<String> options = - Arrays.asList("-classpath", String.join(File.pathSeparator, driver, api, jar)); + List<String> options = Arrays.asList("-classpath", String.join(File.pathSeparator, api, jar)); System.out.printf( "Compile crash reproducer %s with options %s%n", source.getAbsolutePath(), options); CompilationTask task = |