Skip to content

Commit d165ba5

Browse files
infra: Fix the compile script to match new FI frontend (#13037)
This PR fixes the compile script in the base-builder to make the introspector build of JVM and rust project follow new route that has been bumped in #12983. Signed-off-by: Arthur Chan <[email protected]> Co-authored-by: DavidKorczynski <[email protected]>
1 parent 9e561af commit d165ba5

File tree

1 file changed

+5
-26
lines changed
  • infra/base-images/base-builder

1 file changed

+5
-26
lines changed

infra/base-images/base-builder/compile

+5-26
Original file line numberDiff line numberDiff line change
@@ -353,28 +353,7 @@ if [ "$SANITIZER" = "introspector" ] || [ "$RUST_SANITIZER" = "introspector" ];
353353
python3 -m pip install -e .
354354
cd /src/
355355

356-
if [ "$FUZZING_LANGUAGE" = "jvm" ]; then
357-
echo "GOING jvm route"
358-
359-
set -x
360-
# Output will be put in /out/
361-
python3 -m fuzz_introspector.frontends.oss_fuzz --language jvm --target-dir $SRC --entrypoint fuzzerTestOneInput
362-
363-
# Move files temporarily to fit workflow of other languages.
364-
mkdir -p $SRC/my-fi-data
365-
find ./ -name *.data -exec mv {} $SRC/my-fi-data/ \;
366-
find ./ -name *.data.yaml -exec mv {} $SRC/my-fi-data/ \;
367-
elif [ "$FUZZING_LANGUAGE" = "rust" ]; then
368-
echo "GOING rust route"
369-
370-
# Run the rust frontend
371-
python3 -m fuzz_introspector.frontends.oss_fuzz --language rust --target-dir $SRC
372-
373-
# Move files temporarily to fix workflow of other languages.
374-
mkdir -p $SRC/my-fi-data
375-
find ./ -name "*.data" -exec mv {} $SRC/my-fi-data/ \;
376-
find ./ -name "*.data.yaml" -exec mv {} $SRC/my-fi-data/ \;
377-
356+
if [ "$FUZZING_LANGUAGE" = "rust" ]; then
378357
# Restore the sanitizer flag for rust
379358
export SANITIZER="introspector"
380359
fi
@@ -413,15 +392,15 @@ if [ "$SANITIZER" = "introspector" ] || [ "$RUST_SANITIZER" = "introspector" ];
413392
echo "GOING jvm route"
414393
set -x
415394
find $OUT/ -name "jacoco.xml" -exec cp {} $SRC/inspector/ \;
416-
REPORT_ARGS="$REPORT_ARGS --target-dir=$SRC/inspector"
395+
REPORT_ARGS="$REPORT_ARGS --target-dir=$SRC --out-dir=$SRC/inspector"
417396
REPORT_ARGS="$REPORT_ARGS --language=jvm"
418-
fuzz-introspector report $REPORT_ARGS
397+
fuzz-introspector full $REPORT_ARGS
419398
rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
420399
elif [ "$FUZZING_LANGUAGE" = "rust" ]; then
421400
echo "GOING rust route"
422-
REPORT_ARGS="$REPORT_ARGS --target-dir=$SRC/inspector"
401+
REPORT_ARGS="$REPORT_ARGS --target-dir=$SRC --out-dir=$SRC/inspector"
423402
REPORT_ARGS="$REPORT_ARGS --language=rust"
424-
fuzz-introspector report $REPORT_ARGS
403+
fuzz-introspector full $REPORT_ARGS
425404
rsync -avu --delete "$SRC/inspector/" "$OUT/inspector"
426405
else
427406
# C/C++

0 commit comments

Comments
 (0)