mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 02:51:48 +00:00
travis: Force travis build to fail when core files are dumped
This commit is contained in:
@@ -7,10 +7,7 @@ asan_check() {
|
||||
}
|
||||
|
||||
check_logs() {
|
||||
# For some strange reason, now we need to give ubuntu some time to flush it's
|
||||
# FS cache in order to see error logs, even though all commands are executing
|
||||
# synchronously
|
||||
sleep 1
|
||||
check_core_dumps
|
||||
# Iterate through each log to remove an useless warning
|
||||
for log in $(find "$1" -type f -name "$2"); do
|
||||
sed -i "$log" \
|
||||
@@ -29,6 +26,15 @@ check_logs() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_core_dumps() {
|
||||
sleep 2
|
||||
local c
|
||||
for c in $(find ./ -name '*core*' -print); do
|
||||
gdb -q -n -batch -ex bt build/bin/nvim $c
|
||||
exit 1
|
||||
done
|
||||
}
|
||||
|
||||
set_environment() {
|
||||
local prefix="$1/usr"
|
||||
eval $($prefix/bin/luarocks path)
|
||||
|
||||
@@ -23,4 +23,6 @@ CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
|
||||
|
||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" unittest
|
||||
$MAKE_CMD test
|
||||
check_core_dumps
|
||||
$MAKE_CMD oldtest
|
||||
check_core_dumps
|
||||
|
||||
@@ -20,9 +20,9 @@ before_install:
|
||||
# Need xvfb for running some tests with xclip
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
- sudo apt-get install xclip
|
||||
- sudo apt-get install xclip gdb
|
||||
script:
|
||||
# This will pass the environment variables down to a bash process which runs
|
||||
# as $USER, while retaining the environment variables defined and belonging
|
||||
# to secondary groups given above in usermod.
|
||||
- sudo -E su ${USER} -c "sh -e \"${CI_SCRIPTS}/${CI_TARGET}.sh\""
|
||||
- sudo -E su ${USER} -c "ulimit -c 102400; sh -e \"${CI_SCRIPTS}/${CI_TARGET}.sh\""
|
||||
|
||||
Reference in New Issue
Block a user