Skip to content

Commit

Permalink
gson,junrar,rome: refine build scripts
Browse files Browse the repository at this point in the history
The general `find` command is causing some friction in fuzz introspector
projects. This PR makes sure the projects only build the fuzzing
harnesses that are meant to be build.

Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski committed Feb 13, 2025
1 parent 619fb24 commit 2c0e0c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/gson/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ALL_JARS="gson.jar"
BUILD_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "$OUT/%s:"):$JAZZER_API_PATH
RUNTIME_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "\$this_dir/%s:"):.:\$this_dir

for fuzzer in $(find $SRC -name 'Fuzz*.java'); do
for fuzzer in $(find $SRC -maxdepth 1 -name 'Fuzz*.java'); do
fuzzer_basename=$(basename -s .java $fuzzer)
javac -cp $BUILD_CLASSPATH $fuzzer
cp $SRC/$fuzzer_basename.class $OUT/
Expand Down
2 changes: 1 addition & 1 deletion projects/junrar/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BUILD_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "$OUT/%s:"):$JAZZER_API_PATH
# All .jar and .class files lie in the same directory as the fuzzer at runtime.
RUNTIME_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "\$this_dir/%s:"):\$this_dir

for fuzzer in $(find $SRC -name '*Fuzzer.java'); do
for fuzzer in $(find $SRC -maxdepth 1 -name '*Fuzzer.java'); do
fuzzer_basename=$(basename -s .java $fuzzer)
javac -cp $BUILD_CLASSPATH $fuzzer
cp $SRC/$fuzzer_basename.class $OUT/
Expand Down
2 changes: 1 addition & 1 deletion projects/rome/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BUILD_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "$OUT/%s:"):$JAZZER_API_PATH
# All .jar and .class files lie in the same directory as the fuzzer at runtime.
RUNTIME_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "\$this_dir/%s:"):\$this_dir

for fuzzer in $(find $SRC -name '*Fuzzer.java'); do
for fuzzer in $(find $SRC -maxdepth 1 -name '*Fuzzer.java'); do
fuzzer_basename=$(basename -s .java $fuzzer)
javac -cp $BUILD_CLASSPATH $fuzzer
cp $SRC/$fuzzer_basename.class $OUT/
Expand Down

0 comments on commit 2c0e0c4

Please sign in to comment.