mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci: Fold output in travis web interface
This commit is contained in:
parent
5d73a6e5df
commit
48fa42153a
@ -11,14 +11,35 @@ FAIL_SUMMARY=""
|
|||||||
END_MARKER="$BUILD_DIR/.tests_finished"
|
END_MARKER="$BUILD_DIR/.tests_finished"
|
||||||
FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors"
|
FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors"
|
||||||
|
|
||||||
|
ANSI_CLEAR="\033[0K"
|
||||||
|
|
||||||
|
travis_fold() {
|
||||||
|
local action="$1"
|
||||||
|
local name="$2"
|
||||||
|
name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\+/-/g')"
|
||||||
|
name="$(echo -n "$name" | sed 's/-$//')"
|
||||||
|
echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if test "$TRAVIS" != "true" ; then
|
||||||
|
travis_fold() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
enter_suite() {
|
enter_suite() {
|
||||||
|
set +x
|
||||||
FAILED=0
|
FAILED=0
|
||||||
rm -f "${END_MARKER}"
|
rm -f "${END_MARKER}"
|
||||||
local suite_name="$1"
|
local suite_name="$1"
|
||||||
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name"
|
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name"
|
||||||
|
travis_fold start "${NVIM_TEST_CURRENT_SUITE}"
|
||||||
|
set -x
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_suite() {
|
exit_suite() {
|
||||||
|
set +x
|
||||||
|
travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
|
||||||
if test $FAILED -ne 0 ; then
|
if test $FAILED -ne 0 ; then
|
||||||
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"
|
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"
|
||||||
echo "${FAIL_SUMMARY}"
|
echo "${FAIL_SUMMARY}"
|
||||||
|
@ -166,3 +166,8 @@ install_nvim() {(
|
|||||||
|
|
||||||
exit_suite
|
exit_suite
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
csi_clean() {
|
||||||
|
find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete
|
||||||
|
find "${BUILD_DIR}" -name '*test-include*.o' -delete
|
||||||
|
}
|
||||||
|
@ -8,17 +8,20 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "${CI_DIR}/common/build.sh"
|
source "${CI_DIR}/common/build.sh"
|
||||||
source "${CI_DIR}/common/suite.sh"
|
source "${CI_DIR}/common/suite.sh"
|
||||||
|
|
||||||
enter_suite 'lint'
|
enter_suite 'clint'
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
csi_clean() {
|
|
||||||
find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete
|
|
||||||
find "${BUILD_DIR}" -name '*test-include*.o' -delete
|
|
||||||
}
|
|
||||||
|
|
||||||
run_test 'top_make clint-full' clint
|
run_test 'top_make clint-full' clint
|
||||||
|
|
||||||
|
exit_suite --continue
|
||||||
|
|
||||||
|
enter_suite 'testlint'
|
||||||
|
|
||||||
run_test 'top_make testlint' testlint
|
run_test 'top_make testlint' testlint
|
||||||
|
|
||||||
|
exit_suite --continue
|
||||||
|
|
||||||
|
enter_suite single-includes
|
||||||
|
|
||||||
CLICOLOR_FORCE=1 run_test_wd \
|
CLICOLOR_FORCE=1 run_test_wd \
|
||||||
--allow-hang \
|
--allow-hang \
|
||||||
10s \
|
10s \
|
||||||
@ -26,4 +29,6 @@ CLICOLOR_FORCE=1 run_test_wd \
|
|||||||
'csi_clean' \
|
'csi_clean' \
|
||||||
single-includes
|
single-includes
|
||||||
|
|
||||||
|
exit_suite --continue
|
||||||
|
|
||||||
end_tests
|
end_tests
|
||||||
|
@ -8,16 +8,18 @@ source "${CI_DIR}/common/build.sh"
|
|||||||
source "${CI_DIR}/common/test.sh"
|
source "${CI_DIR}/common/test.sh"
|
||||||
source "${CI_DIR}/common/suite.sh"
|
source "${CI_DIR}/common/suite.sh"
|
||||||
|
|
||||||
set -x
|
enter_suite build
|
||||||
|
|
||||||
enter_suite tests
|
|
||||||
|
|
||||||
check_core_dumps --delete quiet
|
check_core_dumps --delete quiet
|
||||||
|
|
||||||
prepare_build
|
prepare_build
|
||||||
build_nvim
|
build_nvim
|
||||||
|
|
||||||
if [ "$CLANG_SANITIZER" != "TSAN" ]; then
|
exit_suite --continue
|
||||||
|
|
||||||
|
enter_suite tests
|
||||||
|
|
||||||
|
if test "$CLANG_SANITIZER" != "TSAN" ; then
|
||||||
# Additional threads are only created when the builtin UI starts, which
|
# Additional threads are only created when the builtin UI starts, which
|
||||||
# doesn't happen in the unit/functional tests
|
# doesn't happen in the unit/functional tests
|
||||||
run_test run_unittests
|
run_test run_unittests
|
||||||
@ -27,4 +29,6 @@ run_test run_oldtests
|
|||||||
|
|
||||||
run_test install_nvim
|
run_test install_nvim
|
||||||
|
|
||||||
|
exit_suite --continue
|
||||||
|
|
||||||
end_tests
|
end_tests
|
||||||
|
Loading…
Reference in New Issue
Block a user