2 echo "Testing Pulga under Valgrind"
4 # Making sure we're in the directory where this script is contained
6 while [ -h "$PRG" ] ; do
10 scriptdir
=$
(dirname "$PRG")
14 if [[ ! -f "./target/release/pulga" ]]; then
15 echo "you need to run \"cargo build --release\" first"
19 # Run it under Valgrind, fail if Valgrind reports any error
20 valgrind
--leak-check=full
--error-exitcode=123 .
/target
/release
/pulga
22 if [[ "$?" != '123' ]]; then
24 echo 'Valgrind did not find any errors'