wget/fuzz/test-runner.sh
Darshit Shah cf788d60e4 Use a LOG_COMPILER for running fuzz tests
This prevents needing a special case in the fuzz tests to detect
valgrind usage and a new exec. Instead, we simply detect the environment
in a shell script and start the test with valgrind in the first place.

* fuzz/test-runner.sh: New script for running the fuzz tests
* fuzz/main.c (main): Remove code for re-running under valgrind
* fuzz/Makefile.am: Set the LOG_COMPILER to test-runner.sh and remember
  to add it to the list of extra files for packaging
2021-03-16 21:48:13 +01:00

10 lines
190 B
Bash
Executable File

#!/usr/bin/env sh
WRAPPER=""
if [ -n "$VALGRIND_TESTS" ]; then
WRAPPER="valgrind --error-exitcode=301 --leak-check=yes --show-reachable=yes --track-origins=yes"
fi
exec $WRAPPER "$@"