mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
20 lines
459 B
Bash
Executable File
20 lines
459 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
# Runs fuzz tests using `cargo test-fuzz`.
|
|
|
|
PACKAGE=$1
|
|
TEST_TIME=${2:-5}
|
|
|
|
echo Building corpus.
|
|
cargo test -p $PACKAGE
|
|
|
|
# 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 --exact -p "$PACKAGE" $test -- -V $TEST_TIME
|
|
set +x
|
|
done; |