mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci: run all tests with run_suite function
This commit is contained in:
parent
f30ce7d273
commit
b8529ea9b8
@ -50,9 +50,7 @@ exit_suite() {
|
|||||||
if test "$1" != "--continue" ; then
|
if test "$1" != "--continue" ; then
|
||||||
exit $FAILED
|
exit $FAILED
|
||||||
else
|
else
|
||||||
local saved_failed=$FAILED
|
|
||||||
FAILED=0
|
FAILED=0
|
||||||
return $saved_failed
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,18 +87,15 @@ check_sanitizer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_unittests() {(
|
run_unittests() {(
|
||||||
enter_suite unittests
|
|
||||||
ulimit -c unlimited || true
|
ulimit -c unlimited || true
|
||||||
if ! build_make unittest ; then
|
if ! build_make unittest ; then
|
||||||
fail 'unittests' F 'Unit tests failed'
|
fail 'unittests' F 'Unit tests failed'
|
||||||
fi
|
fi
|
||||||
submit_coverage unittest
|
submit_coverage unittest
|
||||||
check_core_dumps "$(command -v luajit)"
|
check_core_dumps "$(command -v luajit)"
|
||||||
exit_suite
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
run_functionaltests() {(
|
run_functionaltests() {(
|
||||||
enter_suite functionaltests
|
|
||||||
ulimit -c unlimited || true
|
ulimit -c unlimited || true
|
||||||
if ! build_make ${FUNCTIONALTEST}; then
|
if ! build_make ${FUNCTIONALTEST}; then
|
||||||
fail 'functionaltests' F 'Functional tests failed'
|
fail 'functionaltests' F 'Functional tests failed'
|
||||||
@ -107,11 +104,9 @@ run_functionaltests() {(
|
|||||||
check_sanitizer "${LOG_DIR}"
|
check_sanitizer "${LOG_DIR}"
|
||||||
valgrind_check "${LOG_DIR}"
|
valgrind_check "${LOG_DIR}"
|
||||||
check_core_dumps
|
check_core_dumps
|
||||||
exit_suite
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
run_oldtests() {(
|
run_oldtests() {(
|
||||||
enter_suite oldtests
|
|
||||||
ulimit -c unlimited || true
|
ulimit -c unlimited || true
|
||||||
if ! make oldtest; then
|
if ! make oldtest; then
|
||||||
reset
|
reset
|
||||||
@ -121,7 +116,6 @@ run_oldtests() {(
|
|||||||
check_sanitizer "${LOG_DIR}"
|
check_sanitizer "${LOG_DIR}"
|
||||||
valgrind_check "${LOG_DIR}"
|
valgrind_check "${LOG_DIR}"
|
||||||
check_core_dumps
|
check_core_dumps
|
||||||
exit_suite
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
check_runtime_files() {(
|
check_runtime_files() {(
|
||||||
@ -146,10 +140,9 @@ check_runtime_files() {(
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
install_nvim() {(
|
install_nvim() {(
|
||||||
enter_suite 'install_nvim'
|
|
||||||
if ! build_make install ; then
|
if ! build_make install ; then
|
||||||
fail 'install' E 'make install failed'
|
fail 'install' E 'make install failed'
|
||||||
exit_suite
|
exit_suite --continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${INSTALL_PREFIX}/bin/nvim" --version
|
"${INSTALL_PREFIX}/bin/nvim" --version
|
||||||
@ -179,6 +172,4 @@ install_nvim() {(
|
|||||||
if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then
|
if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then
|
||||||
fail 'funcnames' F "It appears that $genvimsynf does not contain $gpat."
|
fail 'funcnames' F "It appears that $genvimsynf does not contain $gpat."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit_suite
|
|
||||||
)}
|
)}
|
||||||
|
@ -8,12 +8,12 @@ run_tests(){
|
|||||||
# Additional threads are only created when the builtin UI starts, which
|
# Additional threads are only created when the builtin UI starts, which
|
||||||
# doesn't happen in the unit/functional tests
|
# doesn't happen in the unit/functional tests
|
||||||
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
|
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
|
||||||
run_test run_unittests unittests
|
run_suite run_unittests unittests
|
||||||
fi
|
fi
|
||||||
run_test run_functionaltests functionaltests
|
run_suite run_functionaltests functionaltests
|
||||||
fi
|
fi
|
||||||
run_test run_oldtests oldtests
|
run_suite run_oldtests oldtests
|
||||||
run_test install_nvim install_nvim
|
run_suite install_nvim install_nvim
|
||||||
}
|
}
|
||||||
|
|
||||||
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
Loading…
Reference in New Issue
Block a user