diff options
| author | ZyX <kp-pav@yandex.ru> | 2017-05-01 06:45:24 +0300 |
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-05-01 16:36:24 +0300 |
| commit | 48fa42153acbf271db8edc94f94b524eb5b492e0 (patch) | |
| tree | 14e8437ed3dab0523b393607ca7fb1951aaa3f7e /ci/common | |
| parent | 5d73a6e5dfbd1a7ce27888e7a7ac1c402da9dfc8 (diff) | |
| download | rneovim-48fa42153acbf271db8edc94f94b524eb5b492e0.tar.gz rneovim-48fa42153acbf271db8edc94f94b524eb5b492e0.tar.bz2 rneovim-48fa42153acbf271db8edc94f94b524eb5b492e0.zip | |
ci: Fold output in travis web interface
Diffstat (limited to 'ci/common')
| -rw-r--r-- | ci/common/suite.sh | 21 | ||||
| -rw-r--r-- | ci/common/test.sh | 5 |
2 files changed, 26 insertions, 0 deletions
diff --git a/ci/common/suite.sh b/ci/common/suite.sh index a6fe7dd650..54afa28be6 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -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}" diff --git a/ci/common/test.sh b/ci/common/test.sh index a4b7680830..c987875cc0 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -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 +} |