diff options
author | ZyX <kp-pav@yandex.ru> | 2016-11-01 15:51:07 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-02-14 00:33:20 +0300 |
commit | 3e94510570316129d29a38b8069ccb62a7f55bf6 (patch) | |
tree | 0abd119aa19d9cf3e09faa5846f01281bd5a687e | |
parent | da2139296d1962c133920ec251e8d7597425ce1d (diff) | |
download | rneovim-3e94510570316129d29a38b8069ccb62a7f55bf6.tar.gz rneovim-3e94510570316129d29a38b8069ccb62a7f55bf6.tar.bz2 rneovim-3e94510570316129d29a38b8069ccb62a7f55bf6.zip |
ci: Try checking for core dumps
Note: can’t use `dbg_cmd` string because I need arguments with spaces (i.e. `bt
all` and `thread apply all bt full`).
-rw-r--r-- | .ci/common/test.sh | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/.ci/common/test.sh b/.ci/common/test.sh index 714dfd297b..405ff60aba 100644 --- a/.ci/common/test.sh +++ b/.ci/common/test.sh @@ -1,20 +1,22 @@ check_core_dumps() { - sleep 2 - + local app="${1:-${BUILD_DIR}/bin/nvim}" if [[ "${TRAVIS_OS_NAME}" == osx ]]; then local cores="$(find /cores/ -type f -print)" - local dbg_cmd="lldb -Q -o bt -f ${BUILD_DIR}/bin/nvim -c" else # FIXME (fwalch): Will trigger if a file named core.* exists outside of $DEPS_BUILD_DIR. local cores="$(find ./ -type f -not -path "*${DEPS_BUILD_DIR}*" -name 'core.*' -print)" - local dbg_cmd="gdb -n -batch -ex bt ${BUILD_DIR}/bin/nvim" fi if [ -z "${cores}" ]; then return fi + local core for core in $cores; do - ${dbg_cmd} "${core}" + if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + lldb -Q -o "bt all" -f "${app}" -c "${core}" + else + gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" + fi done exit 1 } @@ -49,28 +51,39 @@ asan_check() { } run_unittests() { - ${MAKE_CMD} -C "${BUILD_DIR}" unittest + ulimit -c unlimited + if ! ${MAKE_CMD} -C "${BUILD_DIR}" unittest ; then + check_core_dumps "$(which luajit)" + exit 1 + fi + check_core_dumps "$(which luajit)" } run_functionaltests() { + ulimit -c unlimited if ! ${MAKE_CMD} -C "${BUILD_DIR}" ${FUNCTIONALTEST}; then asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" + check_core_dumps exit 1 fi asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" + check_core_dumps } run_oldtests() { + ulimit -c unlimited if ! make -C "${TRAVIS_BUILD_DIR}/src/nvim/testdir"; then reset asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" + check_core_dumps exit 1 fi asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" + check_core_dumps } install_nvim() { |