commit 7a0fd7a288827e26bf65279a05b952b057b31d01
parent fbcbd1d05e2d51dda159d78d99e67b6041182321
Author: Dundar Göc <gocdundar@gmail.com>
Date: Fri, 4 Mar 2022 16:51:38 +0100
ci: remove variable FAIL_SUMMARY
On GitHub Actions it just repeats the summary that is shown just after.
When run outside of GitHub Actions it erroneously shows the summary of
the previous suites.
Diffstat:
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/ci/common/suite.sh b/ci/common/suite.sh
@@ -1,9 +1,3 @@
-# HACK: get newline for use in strings given that "\n" and $'' do not work.
-NL="$(printf '\nE')"
-NL="${NL%E}"
-
-FAIL_SUMMARY=""
-
# Test success marker. If END_MARKER file exists, we know that all tests
# finished. If FAIL_SUMMARY_FILE exists we know that some tests failed, this
# file will contain information about failed tests. Build is considered
@@ -11,19 +5,6 @@ FAIL_SUMMARY=""
END_MARKER="$BUILD_DIR/.tests_finished"
FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors"
-enter_suite() {
- FAILED=0
- rm -f "${END_MARKER}"
-}
-
-exit_suite() {
- if test $FAILED -ne 0 ; then
- echo "Test failed, summary:"
- echo "${FAIL_SUMMARY}"
- fi
- FAILED=0
-}
-
fail() {
local test_name="$1"
local message="$2"
@@ -31,10 +12,8 @@ fail() {
: ${message:=Test $test_name failed}
local full_msg="$test_name :: $message"
- FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}"
echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}"
echo "Failed: $full_msg"
- FAILED=1
}
ended_successfully() {
@@ -64,7 +43,6 @@ run_suite() {
local command="$1"
local suite_name="$2"
- enter_suite
+ rm -f "${END_MARKER}"
eval "$command" || fail "$suite_name"
- exit_suite
}
diff --git a/ci/common/test.sh b/ci/common/test.sh
@@ -140,7 +140,7 @@ check_runtime_files() {(
install_nvim() {(
if ! build_make install ; then
fail 'install' 'make install failed'
- exit_suite
+ exit 1
fi
"${INSTALL_PREFIX}/bin/nvim" --version