ci: run all suites with run_suite function

This commit is contained in:
Dundar Göc 2022-02-06 12:41:52 +01:00
parent f02a5a7bda
commit f30ce7d273
2 changed files with 19 additions and 27 deletions

View File

@ -44,7 +44,9 @@ build_deps() {
cd "${CI_BUILD_DIR}"
}
prepare_build() {
build_nvim() {
check_core_dumps --delete quiet
if test -n "${CLANG_SANITIZER}" ; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON"
fi
@ -53,9 +55,8 @@ prepare_build() {
cd "${BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS} $@'."
cmake -G Ninja ${CMAKE_FLAGS} "$@" "${CI_BUILD_DIR}"
}
build_nvim() {
echo "Building nvim."
if ! top_make nvim ; then
exit 1

View File

@ -3,34 +3,25 @@
set -e
set -o pipefail
run_tests(){
if test "$CLANG_SANITIZER" != "TSAN"; then
# Additional threads are only created when the builtin UI starts, which
# doesn't happen in the unit/functional tests
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
run_test run_unittests unittests
fi
run_test run_functionaltests functionaltests
fi
run_test run_oldtests oldtests
run_test install_nvim install_nvim
}
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
source "${CI_DIR}/common/test.sh"
source "${CI_DIR}/common/suite.sh"
enter_suite build
check_core_dumps --delete quiet
prepare_build
build_nvim
exit_suite --continue
enter_suite tests
if test "$CLANG_SANITIZER" != "TSAN" ; then
# Additional threads are only created when the builtin UI starts, which
# doesn't happen in the unit/functional tests
if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then
run_test run_unittests unittests
fi
run_test run_functionaltests functionaltests
fi
run_test run_oldtests oldtests
run_test install_nvim install_nvim
exit_suite --continue
run_suite 'build_nvim' 'build'
run_suite 'run_tests' 'tests'
end_tests