diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-02-06 12:41:52 +0100 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-02-07 09:57:21 +0100 |
commit | f30ce7d273cb4792f8f0354e4ae80c888a019e9e (patch) | |
tree | 43b069a9ae06f7900c6ab7db7a0a20e7145604c0 | |
parent | f02a5a7bdaafc1c5ff61aee133eb2b6ba5f57586 (diff) | |
download | rneovim-f30ce7d273cb4792f8f0354e4ae80c888a019e9e.tar.gz rneovim-f30ce7d273cb4792f8f0354e4ae80c888a019e9e.tar.bz2 rneovim-f30ce7d273cb4792f8f0354e4ae80c888a019e9e.zip |
ci: run all suites with run_suite function
-rw-r--r-- | ci/common/build.sh | 7 | ||||
-rwxr-xr-x | ci/run_tests.sh | 39 |
2 files changed, 19 insertions, 27 deletions
diff --git a/ci/common/build.sh b/ci/common/build.sh index c44c234274..b8bbff0b16 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -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 diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 6c310ccc76..e6d8dc8ca8 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -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 |