mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 09:14:24 +00:00
Add test reporting to travis script
This commit is contained in:
4
Makefile
4
Makefile
@@ -22,9 +22,7 @@ cmake: clean deps
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
for file in lua mbyte mzscheme small tiny; do \
|
||||
rm -f src/testdir/$$file.vim; \
|
||||
done
|
||||
cd src/testdir && make clean
|
||||
|
||||
install: build/bin/nvim
|
||||
${MAKE} -C build install
|
||||
|
||||
@@ -3,5 +3,18 @@
|
||||
export VALGRIND_CHECK=1
|
||||
make cmake CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$PWD/dist"
|
||||
make
|
||||
make test > /dev/null 2>&1
|
||||
echo "Running tests with valgrind..."
|
||||
if ! make test > /dev/null 2>&1; then
|
||||
failed=$(ls src/testdir/valgrind.*)
|
||||
if [ -n "$failed" ]; then
|
||||
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
|
||||
exit 2
|
||||
fi
|
||||
make install
|
||||
|
||||
@@ -28,7 +28,7 @@ SCRIPTS := test1.out test2.out test3.out test4.out test5.out test6.out \
|
||||
SCRIPTS_GUI := test16.out
|
||||
|
||||
ifdef VALGRIND_CHECK
|
||||
VALGRIND = valgrind --suppressions=../../.valgrind.supp --leak-check=yes --error-exitcode=1 --log-file=valgrind.$*
|
||||
VALGRIND = valgrind --suppressions=../../.valgrind.supp --leak-check=yes --error-exitcode=111 --log-file=valgrind.$*
|
||||
endif
|
||||
|
||||
ifdef TESTNUM
|
||||
|
||||
Reference in New Issue
Block a user