Skip to content

Commit

Permalink
Add corpus builder for config
Browse files Browse the repository at this point in the history
  • Loading branch information
nathaniel-brough committed Dec 23, 2023
1 parent 72ee12e commit 8e2db97
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions gix-config/fuzz/fuzz_targets/fuzz_file_corpus_builder.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -eox pipefail

CWD=$(pwd)

ROOT=$1
OUTPUT_CORPUS=$2
FIXTURES_DIR=$(readlink -f $ROOT/gix-config/tests/fixtures)

echo $ROOT
echo $FIXTURES_DIR
find $FIXTURES_DIR -name "*.config" -exec zip -j $OUTPUT_CORPUS {} \;

# Generate configs.
REPO=/tmp/config_repo
mkdir $REPO
cd $REPO
bash $FIXTURES_DIR/make_config_repo.sh
find . -name ".*" -exec zip $OUTPUT_CORPUS {} \;
cd $CWD
rm -r $REPO

0 comments on commit 8e2db97

Please sign in to comment.