diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-03-05 15:40:20 +0100 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-03-10 09:21:41 +0100 |
commit | d47714d87c0ea082568fb9f59a579381253bf179 (patch) | |
tree | 7d5584eab2c0ca6bbdc3f66e48531ecaeba6ad7b | |
parent | 7a0fd7a288827e26bf65279a05b952b057b31d01 (diff) | |
download | rneovim-d47714d87c0ea082568fb9f59a579381253bf179.tar.gz rneovim-d47714d87c0ea082568fb9f59a579381253bf179.tar.bz2 rneovim-d47714d87c0ea082568fb9f59a579381253bf179.zip |
ci: remove function run_suite
-rw-r--r-- | ci/common/suite.sh | 8 | ||||
-rwxr-xr-x | ci/run_lint.sh | 22 | ||||
-rwxr-xr-x | ci/run_tests.sh | 21 |
3 files changed, 23 insertions, 28 deletions
diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 7951f8ce27..c0c470dce1 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -38,11 +38,3 @@ end_tests() { touch "${END_MARKER}" ended_successfully } - -run_suite() { - local command="$1" - local suite_name="$2" - - rm -f "${END_MARKER}" - eval "$command" || fail "$suite_name" -} diff --git a/ci/run_lint.sh b/ci/run_lint.sh index 2fea7a40c0..d9869c2756 100755 --- a/ci/run_lint.sh +++ b/ci/run_lint.sh @@ -8,30 +8,32 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/suite.sh" +rm -f "$END_MARKER" + if [[ "$GITHUB_ACTIONS" != "true" ]]; then - run_suite 'make clint-full' 'clint' - run_suite 'make lualint' 'lualint' - run_suite 'make pylint' 'pylint' - run_suite 'make shlint' 'shlint' - run_suite 'make check-single-includes' 'single-includes' + make clint-full || fail 'clint' + make lualint || fail 'lualint' + make pylint || fail 'pylint' + make shlint || fail 'shlint' + make check-single-includes || fail 'single-includes' end_tests else case "$1" in clint) - run_suite 'make clint-full' 'clint' + make clint-full || fail 'clint' ;; lualint) - run_suite 'make lualint' 'lualint' + make lualint || fail 'lualint' ;; pylint) - run_suite 'make pylint' 'pylint' + make pylint || fail 'pylint' ;; shlint) - run_suite 'make shlint' 'shlint' + make shlint || fail 'shlint' ;; single-includes) - run_suite 'make check-single-includes' 'single-includes' + make check-single-includes || fail 'single-includes' ;; *) :;; diff --git a/ci/run_tests.sh b/ci/run_tests.sh index ae85246ab6..a121d28902 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -8,38 +8,39 @@ source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/test.sh" source "${CI_DIR}/common/suite.sh" +rm -f "$END_MARKER" if [[ "$GITHUB_ACTIONS" != "true" ]]; then - run_suite 'build_nvim' 'build' + build_nvim || fail 'build' 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_suite run_unittests unittests + run_unittests || fail 'unittests' fi - run_suite run_functionaltests functionaltests + run_functionaltests || fail 'functionaltests' fi - run_suite run_oldtests oldtests - run_suite install_nvim install_nvim + run_oldtests || fail 'oldtests' + install_nvim || fail 'install_nvim' end_tests else case "$1" in build) - run_suite 'build_nvim' 'build' + build_nvim || fail 'build' ;; unittests) - run_suite 'run_unittests' 'unittests' + run_unittests || fail 'unittests' ;; functionaltests) - run_suite 'run_functionaltests' 'functionaltests' + run_functionaltests || fail 'functionaltests' ;; oldtests) - run_suite 'run_oldtests' 'oldtests' + run_oldtests || fail 'oldtests' ;; install_nvim) - run_suite 'install_nvim' 'install_nvim' + install_nvim || fail 'install_nvim' ;; *) :;; |