aboutsummaryrefslogtreecommitdiff
path: root/ci/common/suite.sh
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-02-04 18:44:50 +0100
committerDundar Göc <gocdundar@gmail.com>2022-02-04 23:51:51 +0100
commitfa192e97d508acedeee2d2287ee28f4923a3b388 (patch)
tree27caaadf767dfcc18ecc2263cb007184363a59ba /ci/common/suite.sh
parentdcbf9f93e9038d9b4eb782aff2a07e2560f6e04e (diff)
downloadrneovim-fa192e97d508acedeee2d2287ee28f4923a3b388.tar.gz
rneovim-fa192e97d508acedeee2d2287ee28f4923a3b388.tar.bz2
rneovim-fa192e97d508acedeee2d2287ee28f4923a3b388.zip
ci: simplify CI process
Diffstat (limited to 'ci/common/suite.sh')
-rw-r--r--ci/common/suite.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/ci/common/suite.sh b/ci/common/suite.sh
index 561849ce2d..f6a8c22d21 100644
--- a/ci/common/suite.sh
+++ b/ci/common/suite.sh
@@ -73,13 +73,8 @@ fail() {
run_test() {
local cmd="$1"
- test $# -gt 0 && shift
- local test_name="$1"
- : ${test_name:=$cmd}
- test $# -gt 0 && shift
- if ! eval "$cmd" ; then
- fail "${test_name}" "$@"
- fi
+ local test_name="$2"
+ eval "$cmd" || fail "$test_name"
}
ended_successfully() {
@@ -99,3 +94,13 @@ end_tests() {
touch "${END_MARKER}"
ended_successfully
}
+
+run_suite() {
+ local command="$1"
+ local suite_name="$2"
+
+ enter_suite "$suite_name"
+ run_test "$command" "$suite_name"
+ exit_suite --continue
+}
+