ci: remove fail character from fail function

This commit is contained in:
Dundar Göc 2022-03-04 16:22:33 +01:00
parent 9e9322b222
commit 17ecb60c58
2 changed files with 12 additions and 15 deletions

View File

@ -29,13 +29,11 @@ exit_suite() {
fail() {
local test_name="$1"
local fail_char="$2"
local message="$3"
local message="$2"
: ${fail_char:=F}
: ${message:=Test $test_name failed}
local full_msg="$fail_char $NVIM_TEST_CURRENT_SUITE|$test_name :: $message"
local full_msg="$NVIM_TEST_CURRENT_SUITE|$test_name :: $message"
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}"
echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}"
echo "Failed: $full_msg"

View File

@ -51,7 +51,7 @@ check_core_dumps() {
fi
done
if test "$app" != quiet ; then
fail 'cores' E 'Core dumps found'
fail 'cores' 'Core dumps found'
fi
}
@ -72,7 +72,7 @@ check_logs() {
rm "${log}"
done
if test -n "${err}" ; then
fail 'logs' E 'Runtime errors detected.'
fail 'logs' 'Runtime errors detected.'
fi
}
@ -89,7 +89,7 @@ check_sanitizer() {
run_unittests() {(
ulimit -c unlimited || true
if ! build_make unittest ; then
fail 'unittests' F 'Unit tests failed'
fail 'unittests' 'Unit tests failed'
fi
submit_coverage unittest
check_core_dumps "$(command -v luajit)"
@ -98,7 +98,7 @@ run_unittests() {(
run_functionaltests() {(
ulimit -c unlimited || true
if ! build_make ${FUNCTIONALTEST}; then
fail 'functionaltests' F 'Functional tests failed'
fail 'functionaltests' 'Functional tests failed'
fi
submit_coverage functionaltest
check_sanitizer "${LOG_DIR}"
@ -110,7 +110,7 @@ run_oldtests() {(
ulimit -c unlimited || true
if ! make oldtest; then
reset
fail 'oldtests' F 'Legacy tests failed'
fail 'oldtests' 'Legacy tests failed'
fi
submit_coverage oldtest
check_sanitizer "${LOG_DIR}"
@ -129,18 +129,17 @@ check_runtime_files() {(
# Prefer failing the build over using more robust construct because files
# with IFS are not welcome.
if ! test -e "$file" ; then
fail "$test_name" E \
"It appears that $file is only a part of the file name"
fail "$test_name" "It appears that $file is only a part of the file name"
fi
if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then
fail "$test_name" F "$(printf "$message" "$file")"
fail "$test_name" "$(printf "$message" "$file")"
fi
done
)}
install_nvim() {(
if ! build_make install ; then
fail 'install' E 'make install failed'
fail 'install' 'make install failed'
exit_suite
fi
@ -148,7 +147,7 @@ install_nvim() {(
if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then
echo "Running ':help' in the installed nvim failed."
echo "Maybe the helptags have not been generated properly."
fail 'help' F 'Failed running :help'
fail 'help' 'Failed running :help'
fi
# Check that all runtime files were installed
@ -169,6 +168,6 @@ install_nvim() {(
local genvimsynf=syntax/vim/generated.vim
local gpat='syn keyword vimFuncName .*eval'
if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then
fail 'funcnames' F "It appears that $genvimsynf does not contain $gpat."
fail 'funcnames' "It appears that $genvimsynf does not contain $gpat."
fi
)}