diff options
-rw-r--r-- | ci/common/suite.sh | 21 | ||||
-rw-r--r-- | ci/common/test.sh | 5 | ||||
-rwxr-xr-x | ci/run_lint.sh | 19 | ||||
-rwxr-xr-x | ci/run_tests.sh | 12 |
4 files changed, 46 insertions, 11 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 +} diff --git a/ci/run_lint.sh b/ci/run_lint.sh index 5639b4c3db..73647dacaa 100755 --- a/ci/run_lint.sh +++ b/ci/run_lint.sh @@ -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' +enter_suite 'clint' -set -x +run_test 'top_make clint-full' clint -csi_clean() { - find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete - find "${BUILD_DIR}" -name '*test-include*.o' -delete -} +exit_suite --continue + +enter_suite 'testlint' -run_test 'top_make clint-full' clint 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 diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 4abc9eea9f..a0bf6e010d 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -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 |