mirror of
https://github.com/neovim/neovim.git
synced 2025-12-03 15:33:03 +00:00
Merge PR #1384 'Add core dump reporting to travis'
This commit is contained in:
@@ -7,10 +7,7 @@ asan_check() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_logs() {
|
check_logs() {
|
||||||
# For some strange reason, now we need to give ubuntu some time to flush it's
|
check_core_dumps
|
||||||
# FS cache in order to see error logs, even though all commands are executing
|
|
||||||
# synchronously
|
|
||||||
sleep 1
|
|
||||||
# Iterate through each log to remove an useless warning
|
# Iterate through each log to remove an useless warning
|
||||||
for log in $(find "$1" -type f -name "$2"); do
|
for log in $(find "$1" -type f -name "$2"); do
|
||||||
sed -i "$log" \
|
sed -i "$log" \
|
||||||
@@ -29,6 +26,15 @@ check_logs() {
|
|||||||
fi
|
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() {
|
set_environment() {
|
||||||
local prefix="$1/usr"
|
local prefix="$1/usr"
|
||||||
eval $($prefix/bin/luarocks path)
|
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 CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" unittest
|
||||||
$MAKE_CMD test
|
$MAKE_CMD test
|
||||||
|
check_core_dumps
|
||||||
$MAKE_CMD oldtest
|
$MAKE_CMD oldtest
|
||||||
|
check_core_dumps
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export VALGRIND_LOG="$tmpdir/valgrind-%p.log"
|
|||||||
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DUSE_GCOV=ON"
|
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON -DUSE_GCOV=ON"
|
||||||
|
|
||||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" unittest
|
$MAKE_CMD CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}" unittest
|
||||||
|
build/bin/nvim --version
|
||||||
if ! $MAKE_CMD test; then
|
if ! $MAKE_CMD test; then
|
||||||
valgrind_check "$tmpdir"
|
valgrind_check "$tmpdir"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ before_install:
|
|||||||
# Need xvfb for running some tests with xclip
|
# Need xvfb for running some tests with xclip
|
||||||
- export DISPLAY=:99.0
|
- export DISPLAY=:99.0
|
||||||
- sh -e /etc/init.d/xvfb start
|
- sh -e /etc/init.d/xvfb start
|
||||||
- sudo apt-get install xclip
|
- sudo apt-get install xclip gdb
|
||||||
script:
|
script:
|
||||||
# This will pass the environment variables down to a bash process which runs
|
# This will pass the environment variables down to a bash process which runs
|
||||||
# as $USER, while retaining the environment variables defined and belonging
|
# as $USER, while retaining the environment variables defined and belonging
|
||||||
# to secondary groups given above in usermod.
|
# 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\""
|
||||||
|
|||||||
@@ -30,3 +30,10 @@
|
|||||||
fun:vim_strsave
|
fun:vim_strsave
|
||||||
fun:ex_function
|
fun:ex_function
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
uv_spawn_with_optimizations
|
||||||
|
Memcheck:Leak
|
||||||
|
fun:malloc
|
||||||
|
fun:uv_spawn
|
||||||
|
fun:job_start
|
||||||
|
}
|
||||||
|
|||||||
@@ -600,9 +600,14 @@ static void close_channel(Channel *channel)
|
|||||||
if (handle) {
|
if (handle) {
|
||||||
uv_close(handle, close_cb);
|
uv_close(handle, close_cb);
|
||||||
} else {
|
} else {
|
||||||
|
event_push((Event) { .handler = on_stdio_close }, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void on_stdio_close(Event e)
|
||||||
|
{
|
||||||
mch_exit(0);
|
mch_exit(0);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_channel(Channel *channel)
|
static void free_channel(Channel *channel)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ typedef struct {
|
|||||||
// immediate_events: Events that should be processed after exiting libuv event
|
// immediate_events: Events that should be processed after exiting libuv event
|
||||||
// loop(to avoid recursion), but before returning from
|
// loop(to avoid recursion), but before returning from
|
||||||
// `event_poll`
|
// `event_poll`
|
||||||
static klist_t(Event) *deferred_events, *immediate_events;
|
static klist_t(Event) *deferred_events = NULL, *immediate_events = NULL;
|
||||||
|
|
||||||
void event_init(void)
|
void event_init(void)
|
||||||
{
|
{
|
||||||
@@ -68,18 +68,25 @@ void event_init(void)
|
|||||||
|
|
||||||
void event_teardown(void)
|
void event_teardown(void)
|
||||||
{
|
{
|
||||||
|
if (!deferred_events) {
|
||||||
|
// Not initialized(possibly a --version invocation)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
channel_teardown();
|
channel_teardown();
|
||||||
job_teardown();
|
job_teardown();
|
||||||
server_teardown();
|
server_teardown();
|
||||||
signal_teardown();
|
signal_teardown();
|
||||||
input_stop();
|
input_stop();
|
||||||
input_teardown();
|
input_teardown();
|
||||||
do {
|
// this last `uv_run` will return after all handles are stopped, it will
|
||||||
// This will loop forever if we leave any unclosed handles. Currently it is
|
// also take care of finishing any uv_close calls made by other *_teardown
|
||||||
// the most reliable way to use travis for verifying the no libuv-related
|
// functions.
|
||||||
// bugs(which can be hard to track later) were introduced on a PR.
|
|
||||||
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
|
||||||
} while (uv_loop_close(uv_default_loop()));
|
// abort that if we left unclosed handles
|
||||||
|
if (uv_loop_close(uv_default_loop())) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for some event
|
// Wait for some event
|
||||||
|
|||||||
Reference in New Issue
Block a user