Skip to content

Commit

Permalink
askama: update build
Browse files Browse the repository at this point in the history
  • Loading branch information
manunio committed Jun 18, 2024
1 parent deef8c5 commit 6d27d12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion projects/askama/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-rust
RUN apt-get update && apt-get install -y make autoconf automake libtool
RUN git clone --depth 1 https://github.com/djc/askama askama
RUN git clone --single-branch --branch fuzz-add-targets --depth 1 https://github.com/manunio/askama askama
WORKDIR askama
COPY build.sh $SRC/
18 changes: 4 additions & 14 deletions projects/askama/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,8 @@

set -eox pipefail

FUZZ_CRATE_DIRS=$(find . -type d -name fuzz -exec dirname $(readlink -f {}) \;)

for CRATE_DIR in ${FUZZ_CRATE_DIRS[@]};
do
echo "Building crate: $CRATE_DIR"
cd $CRATE_DIR
cargo +nightly-2023-12-28 fuzz build -O
FUZZ_TARGET_OUTPUT_DIR=fuzz/target/x86_64-unknown-linux-gnu/release
for f in fuzz/fuzz_targets/*.rs
do
FUZZ_TARGET_NAME=$(basename ${f%.*})
CRATE_NAME=$(basename $CRATE_DIR)
cp $FUZZ_TARGET_OUTPUT_DIR/$FUZZ_TARGET_NAME $OUT/$CRATE_NAME-$FUZZ_TARGET_NAME
done
target_out_dir=fuzz/target/x86_64-unknown-linux-gnu/release
cargo fuzz build -O
cargo fuzz list | while read i; do
cp $target_out_dir/$i $OUT/
done

0 comments on commit 6d27d12

Please sign in to comment.