2014-02-26 18:23:51 -07:00
|
|
|
#!/bin/sh -e
|
2014-02-26 11:48:26 -07:00
|
|
|
|
2014-02-26 16:19:58 -07:00
|
|
|
export VALGRIND_CHECK=1
|
2014-02-26 18:23:51 -07:00
|
|
|
make cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$PWD/dist"
|
|
|
|
make
|
2014-02-26 17:33:39 -07:00
|
|
|
echo "Running tests with valgrind..."
|
2014-02-26 18:42:10 -07:00
|
|
|
if ! make test > /dev/null; then
|
2014-02-26 18:23:51 -07:00
|
|
|
if ls src/testdir/valgrind.* > /dev/null 2>&1; then
|
2014-02-26 17:33:39 -07:00
|
|
|
echo "Memory leak detected" >&2
|
|
|
|
cat src/testdir/valgrind.*
|
|
|
|
else
|
|
|
|
echo "Failed tests:" >&2
|
|
|
|
for t in src/testdir/*.failed; do
|
|
|
|
echo ${t%%.*}
|
|
|
|
done
|
|
|
|
fi
|
2014-02-26 17:44:04 -07:00
|
|
|
exit 1
|
2014-02-26 17:33:39 -07:00
|
|
|
fi
|
2014-02-26 11:48:26 -07:00
|
|
|
make install
|