mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
ci: fix fuzz tests (#243)
* ci: fix fuzz tests * ci: move fuzz to own job * ci: improve fuzz job speed
This commit is contained in:
13
.github/scripts/fuzz.sh
vendored
13
.github/scripts/fuzz.sh
vendored
@@ -1,16 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Runs fuzz tests using `cargo test-fuzz`. These should only be run after a `cargo test` has been executed once: https://github.com/trailofbits/test-fuzz#usage
|
||||
# Runs fuzz tests using `cargo test-fuzz`.
|
||||
|
||||
PACKAGE=$1
|
||||
TEST_TIME=${2:-5}
|
||||
|
||||
echo "::group::$PACKAGE"
|
||||
|
||||
echo Building corpus.
|
||||
cargo test -p $PACKAGE --no-run --all-features
|
||||
|
||||
# Gets the list of tests present in the package.
|
||||
TESTS=$(cargo test-fuzz --list -p $PACKAGE | head -n -3 | tail -n+9 | cat - <(echo \"--list\"]) | cat - | jq -r ".[]")
|
||||
|
||||
for test in $TESTS
|
||||
do
|
||||
echo Running test: $test
|
||||
set -x
|
||||
cargo test-fuzz --no-ui -p "$PACKAGE" $test -- -V $TEST_TIME
|
||||
set +x
|
||||
done;
|
||||
done;
|
||||
|
||||
echo "::endgroup::"
|
||||
Reference in New Issue
Block a user