mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
ci: remove fail character from fail function
This commit is contained in:
@@ -29,13 +29,11 @@ exit_suite() {
|
|||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
local test_name="$1"
|
local test_name="$1"
|
||||||
local fail_char="$2"
|
local message="$2"
|
||||||
local message="$3"
|
|
||||||
|
|
||||||
: ${fail_char:=F}
|
|
||||||
: ${message:=Test $test_name failed}
|
: ${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}"
|
FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}"
|
||||||
echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}"
|
echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}"
|
||||||
echo "Failed: $full_msg"
|
echo "Failed: $full_msg"
|
||||||
|
@@ -51,7 +51,7 @@ check_core_dumps() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if test "$app" != quiet ; then
|
if test "$app" != quiet ; then
|
||||||
fail 'cores' E 'Core dumps found'
|
fail 'cores' 'Core dumps found'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ check_logs() {
|
|||||||
rm "${log}"
|
rm "${log}"
|
||||||
done
|
done
|
||||||
if test -n "${err}" ; then
|
if test -n "${err}" ; then
|
||||||
fail 'logs' E 'Runtime errors detected.'
|
fail 'logs' 'Runtime errors detected.'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ check_sanitizer() {
|
|||||||
run_unittests() {(
|
run_unittests() {(
|
||||||
ulimit -c unlimited || true
|
ulimit -c unlimited || true
|
||||||
if ! build_make unittest ; then
|
if ! build_make unittest ; then
|
||||||
fail 'unittests' F 'Unit tests failed'
|
fail 'unittests' 'Unit tests failed'
|
||||||
fi
|
fi
|
||||||
submit_coverage unittest
|
submit_coverage unittest
|
||||||
check_core_dumps "$(command -v luajit)"
|
check_core_dumps "$(command -v luajit)"
|
||||||
@@ -98,7 +98,7 @@ run_unittests() {(
|
|||||||
run_functionaltests() {(
|
run_functionaltests() {(
|
||||||
ulimit -c unlimited || true
|
ulimit -c unlimited || true
|
||||||
if ! build_make ${FUNCTIONALTEST}; then
|
if ! build_make ${FUNCTIONALTEST}; then
|
||||||
fail 'functionaltests' F 'Functional tests failed'
|
fail 'functionaltests' 'Functional tests failed'
|
||||||
fi
|
fi
|
||||||
submit_coverage functionaltest
|
submit_coverage functionaltest
|
||||||
check_sanitizer "${LOG_DIR}"
|
check_sanitizer "${LOG_DIR}"
|
||||||
@@ -110,7 +110,7 @@ run_oldtests() {(
|
|||||||
ulimit -c unlimited || true
|
ulimit -c unlimited || true
|
||||||
if ! make oldtest; then
|
if ! make oldtest; then
|
||||||
reset
|
reset
|
||||||
fail 'oldtests' F 'Legacy tests failed'
|
fail 'oldtests' 'Legacy tests failed'
|
||||||
fi
|
fi
|
||||||
submit_coverage oldtest
|
submit_coverage oldtest
|
||||||
check_sanitizer "${LOG_DIR}"
|
check_sanitizer "${LOG_DIR}"
|
||||||
@@ -129,18 +129,17 @@ check_runtime_files() {(
|
|||||||
# Prefer failing the build over using more robust construct because files
|
# Prefer failing the build over using more robust construct because files
|
||||||
# with IFS are not welcome.
|
# with IFS are not welcome.
|
||||||
if ! test -e "$file" ; then
|
if ! test -e "$file" ; then
|
||||||
fail "$test_name" E \
|
fail "$test_name" "It appears that $file is only a part of the file name"
|
||||||
"It appears that $file is only a part of the file name"
|
|
||||||
fi
|
fi
|
||||||
if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then
|
if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then
|
||||||
fail "$test_name" F "$(printf "$message" "$file")"
|
fail "$test_name" "$(printf "$message" "$file")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
)}
|
)}
|
||||||
|
|
||||||
install_nvim() {(
|
install_nvim() {(
|
||||||
if ! build_make install ; then
|
if ! build_make install ; then
|
||||||
fail 'install' E 'make install failed'
|
fail 'install' 'make install failed'
|
||||||
exit_suite
|
exit_suite
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -148,7 +147,7 @@ install_nvim() {(
|
|||||||
if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then
|
if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then
|
||||||
echo "Running ':help' in the installed nvim failed."
|
echo "Running ':help' in the installed nvim failed."
|
||||||
echo "Maybe the helptags have not been generated properly."
|
echo "Maybe the helptags have not been generated properly."
|
||||||
fail 'help' F 'Failed running :help'
|
fail 'help' 'Failed running :help'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that all runtime files were installed
|
# Check that all runtime files were installed
|
||||||
@@ -169,6 +168,6 @@ install_nvim() {(
|
|||||||
local genvimsynf=syntax/vim/generated.vim
|
local genvimsynf=syntax/vim/generated.vim
|
||||||
local gpat='syn keyword vimFuncName .*eval'
|
local gpat='syn keyword vimFuncName .*eval'
|
||||||
if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then
|
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
|
fi
|
||||||
)}
|
)}
|
||||||
|
Reference in New Issue
Block a user