scripts/test_fuzzer.sh: correct working directory (#3024)

This commit is contained in:
ColinSeibel 2025-02-26 09:51:09 +01:00 committed by GitHub
parent a917cc046f
commit 9182fd93e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,30 +43,32 @@ do
continue
fi
cd "$fuzzer" || exit 1
# Clippy checks
if [ "$1" != "--no-clippy" ]; then
echo "[*] Running clippy for $fuzzer"
cargo clippy || exit 1
else
echo "[+] Skipping fmt and clippy for $fuzzer (--no-clippy specified)"
fi
(
cd "$fuzzer" || exit 1
# Clippy checks
if [ "$1" != "--no-clippy" ]; then
echo "[*] Running clippy for $fuzzer"
cargo clippy || exit 1
else
echo "[+] Skipping fmt and clippy for $fuzzer (--no-clippy specified)"
fi
if [ -e ./Makefile.toml ] && grep -qF "skip_core_tasks = true" Makefile.toml; then
echo "[*] Building $fuzzer (running tests is not supported in this context)"
just build || exit 1
echo "[+] Done building $fuzzer"
elif [ -e ./Makefile.toml ]; then
echo "[*] Testing $fuzzer"
just test || exit 1
echo "[+] Done testing $fuzzer"
elif [ -e ./Justfile ]; then
echo "[*] Testing $fuzzer"
just test || exit 1
echo "[+] Done testing $fuzzer"
else
echo "[*] Building $fuzzer"
cargo build || exit 1
echo "[+] Done building $fuzzer"
fi
if [ -e ./Makefile.toml ] && grep -qF "skip_core_tasks = true" Makefile.toml; then
echo "[*] Building $fuzzer (running tests is not supported in this context)"
just build || exit 1
echo "[+] Done building $fuzzer"
elif [ -e ./Makefile.toml ]; then
echo "[*] Testing $fuzzer"
just test || exit 1
echo "[+] Done testing $fuzzer"
elif [ -e ./Justfile ]; then
echo "[*] Testing $fuzzer"
just test || exit 1
echo "[+] Done testing $fuzzer"
else
echo "[*] Building $fuzzer"
cargo build || exit 1
echo "[+] Done building $fuzzer"
fi
)
done