mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 20:20:05 +00:00
20 lines
819 B
Bash
20 lines
819 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
# run fuzzing regression or upload to Fuzzit for long running fuzzing job depending on whether FUZZIT_API_KEY is set
|
||
|
|
||
|
FUZZIT="${TEST_SRCDIR}/fuzzit_linux/fuzzit"
|
||
|
|
||
|
FUZZER_BINARY=$1
|
||
|
FUZZIT_TARGET_NAME="$(basename $1 | sed -e s/_fuzz_test_with_libfuzzer$// -e s/_/-/g)"
|
||
|
|
||
|
if [[ ! -z "${FUZZIT_API_KEY}" ]]; then
|
||
|
"${FUZZIT}" create target --skip-if-exists --public-corpus prysmaticlabs-gh/"${FUZZIT_TARGET_NAME}"
|
||
|
|
||
|
# Run fuzzing first so this is not affected by local-regression timeout
|
||
|
"${FUZZIT}" create job --skip-if-not-exists --host "${PRYSM_BUILD_IMAGE}" --type fuzzing prysmaticlabs-gh/"${FUZZIT_TARGET_NAME}" "${FUZZER_BINARY}"
|
||
|
fi
|
||
|
|
||
|
"${FUZZIT}" create job --skip-if-not-exists --host "${PRYSM_BUILD_IMAGE}" --type local-regression prysmaticlabs-gh/"${FUZZIT_TARGET_NAME}" "${FUZZER_BINARY}"
|