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"
|
||||
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() {
|
||||
set +x
|
||||
FAILED=0
|
||||
rm -f "${END_MARKER}"
|
||||
local suite_name="$1"
|
||||
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name"
|
||||
travis_fold start "${NVIM_TEST_CURRENT_SUITE}"
|
||||
set -x
|
||||
}
|
||||
|
||||
exit_suite() {
|
||||
set +x
|
||||
travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
|
||||
if test $FAILED -ne 0 ; then
|
||||
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"
|
||||
echo "${FAIL_SUMMARY}"
|
||||
|
|
|
@ -166,3 +166,8 @@ install_nvim() {(
|
|||
|
||||
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/suite.sh"
|
||||
|
||||
enter_suite 'lint'
|
||||
|
||||
set -x
|
||||
|
||||
csi_clean() {
|
||||
find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete
|
||||
find "${BUILD_DIR}" -name '*test-include*.o' -delete
|
||||
}
|
||||
enter_suite 'clint'
|
||||
|
||||
run_test 'top_make clint-full' clint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite 'testlint'
|
||||
|
||||
run_test 'top_make testlint' testlint
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
enter_suite single-includes
|
||||
|
||||
CLICOLOR_FORCE=1 run_test_wd \
|
||||
--allow-hang \
|
||||
10s \
|
||||
|
@ -26,4 +29,6 @@ CLICOLOR_FORCE=1 run_test_wd \
|
|||
'csi_clean' \
|
||||
single-includes
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
end_tests
|
||||
|
|
|
@ -8,16 +8,18 @@ source "${CI_DIR}/common/build.sh"
|
|||
source "${CI_DIR}/common/test.sh"
|
||||
source "${CI_DIR}/common/suite.sh"
|
||||
|
||||
set -x
|
||||
|
||||
enter_suite tests
|
||||
enter_suite build
|
||||
|
||||
check_core_dumps --delete quiet
|
||||
|
||||
prepare_build
|
||||
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
|
||||
# doesn't happen in the unit/functional tests
|
||||
run_test run_unittests
|
||||
|
@ -27,4 +29,6 @@ run_test run_oldtests
|
|||
|
||||
run_test install_nvim
|
||||
|
||||
exit_suite --continue
|
||||
|
||||
end_tests
|
||||
|
|
Loading…
Reference in New Issue