5 if [ "$NO_VALGRIND" ]; then
8 cmd=(valgrind --error-exitcode=1 --leak-check=full ./testsuite)
12 # Stdout goes directly to testsuite.out; stderr goes down the pipe.
13 if ! "${cmd[@]}" 2>&1 >testsuite.out | tee testsuite.err; then
14 echo >&2 'Memory errors!'
18 if grep 'LEAK SUMMARY' testsuite.err >/dev/null; then
19 echo >&2 'Memory leaks!'
23 if ! diff -u testsuite.expected testsuite.out; then
24 echo >&2 'Output is incorrect!'
29 echo >&2 'Test suite failed!'
32 echo 'Test suite succeeded.'