ClusterFuzzLite: adds fuzzing for TSV and JSON result formats

pull/409/head
Tpt 2 years ago committed by Thomas Tanon
parent fab5db9511
commit f8486364b3
  1. 23
      .clusterfuzzlite/build.sh

@ -1,4 +1,23 @@
#!/bin/bash -eu #!/bin/bash -eu
cd $SRC/oxigraph shopt -s globstar
function build_seed_corpus() {
mkdir "/tmp/oxigraph_$1"
for file in **/*."$2"
do
hash=($(sha256sum "$file"))
cp "$file" "/tmp/oxigraph_$1/$hash"
done
zip "$1_seed_corpus.zip" /tmp/"oxigraph_$1"/*
rm -r "/tmp/oxigraph_$1"
}
cd "$SRC"/oxigraph
cargo fuzz build -O --debug-assertions cargo fuzz build -O --debug-assertions
cp fuzz/target/x86_64-unknown-linux-gnu/release/sparql_eval $OUT/ for TARGET in sparql_eval sparql_results_json sparql_results_tsv
do
cp fuzz/target/x86_64-unknown-linux-gnu/release/$TARGET "$OUT"/
done
build_seed_corpus sparql_results_json json
build_seed_corpus sparql_results_tsv tsv

Loading…
Cancel
Save