From 26fad863bad65ab66ca34b0879b13868d8aa0d97 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 18:27:33 +0300 Subject: ci: When using restarting tests kill make with the shell --- ci/common/suite.sh | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'ci') diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 568d5d5bee..75bdb5abfb 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -82,21 +82,27 @@ run_test_wd() { local output_file="$(mktemp)" local status_file="$(mktemp)" + local sid_file="$(mktemp)" local restarts=5 local prev_tmpsize=-1 while test $restarts -gt 0 ; do : > "${status_file}" - ( - set -o pipefail - ret=0 - if ! eval "$cmd" 2>&1 | tee -a "$output_file" ; then - ret=1 - fi - echo "$ret" > "$status_file" - exit $ret - ) & - local pid=$! + setsid \ + env \ + output_file="$output_file" \ + status_file="$status_file" \ + sid_file="$sid_file" \ + cmd="$cmd" \ + sh -c ' + set -o pipefail + ps -o sid= > "$sid_file" + ret=0 + if ! eval "$cmd" 2>&1 | tee -a "$output_file" ; then + ret=1 + fi + echo "$ret" > "$status_file" + ' while test "$(stat -c "%s" "$status_file")" -eq 0 ; do prev_tmpsize=$tmpsize sleep $timeout @@ -106,13 +112,13 @@ run_test_wd() { break fi done - restarts=$[ restarts - 1 ] + restarts=$(( restarts - 1 )) if test "$(stat -c "%s" "$status_file")" -eq 0 ; then # status file not updated, assuming hang - kill -KILL $pid + pkill -KILL -s$(cat "$sid_file") if test $restarts -eq 0 ; then if test "x$hang_ok" = "x" ; then - fail "${test_name}" E "Test hang up" + fail "$test_name" E "Test hang up" fi else echo "Test ${test_name} hang up, restarting" @@ -121,11 +127,15 @@ run_test_wd() { else local new_failed="$(cat "$status_file")" if test "x$new_failed" != "x0" ; then - fail "${test_name}" F "Test failed in run_test_wd" + fail "$test_name" F "Test failed in run_test_wd" fi - return 0 + break fi done + + rm -f "$output_file" + rm -f "$status_file" + rm -f "$sid_file" } ended_successfully() { -- cgit From 3a0117c850a69b70bf2a39e9f2e61220a1e7f228 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 18:34:47 +0300 Subject: ci: Do not accidentally kill something unneeded --- ci/common/suite.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 75bdb5abfb..986c145736 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -87,7 +87,8 @@ run_test_wd() { local restarts=5 local prev_tmpsize=-1 while test $restarts -gt 0 ; do - : > "${status_file}" + : > "$status_file" + : > "$sid_file" setsid \ env \ output_file="$output_file" \ @@ -114,8 +115,18 @@ run_test_wd() { done restarts=$(( restarts - 1 )) if test "$(stat -c "%s" "$status_file")" -eq 0 ; then - # status file not updated, assuming hang + # Status file not updated, assuming hang + + # SID not known, this should not ever happen + if test "$(stat -c "%s" "$sid_file")" -eq 0 ; then + fail "$test_name" E "Shell did not run" + break + fi + + # Kill all processes which belong to one session: should get rid of test + # processes as well as sh itself. pkill -KILL -s$(cat "$sid_file") + if test $restarts -eq 0 ; then if test "x$hang_ok" = "x" ; then fail "$test_name" E "Test hang up" -- cgit From fc16d02c3dc8482fb41501f834083146680f41f8 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 19:30:28 +0300 Subject: ci: Do not use pipefail --- ci/common/suite.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'ci') diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 986c145736..4fa8256ee8 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -96,7 +96,6 @@ run_test_wd() { sid_file="$sid_file" \ cmd="$cmd" \ sh -c ' - set -o pipefail ps -o sid= > "$sid_file" ret=0 if ! eval "$cmd" 2>&1 | tee -a "$output_file" ; then -- cgit From 4ccef05829bc9956207299215672c2e8c3e51c43 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 21:43:27 +0300 Subject: ci: Make $cmd failure fail the build without -o pipefail --- ci/common/suite.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'ci') diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 4fa8256ee8..c4120c8584 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -97,11 +97,13 @@ run_test_wd() { cmd="$cmd" \ sh -c ' ps -o sid= > "$sid_file" - ret=0 - if ! eval "$cmd" 2>&1 | tee -a "$output_file" ; then - ret=1 - fi - echo "$ret" > "$status_file" + ( + ret=0 + if ! eval "$cmd" 2>&1 ; then + ret=1 + fi + echo "$ret" > "$status_file" + ) | tee -a "$output_file" ' while test "$(stat -c "%s" "$status_file")" -eq 0 ; do prev_tmpsize=$tmpsize -- cgit From 85903cb0e6a2428c5a071ed78b12a9f95e56792b Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 22:14:32 +0300 Subject: ci: Make scripts in common be dash-compatible `ulimit` may still be not present: dash and busybox support it, but posh does not. --- ci/common/build.sh | 31 ++++++++++++----------- ci/common/suite.sh | 4 +-- ci/common/test.sh | 72 ++++++++++++++++++++++++++++++++++-------------------- 3 files changed, 62 insertions(+), 45 deletions(-) (limited to 'ci') diff --git a/ci/common/build.sh b/ci/common/build.sh index 129622b522..56c24bb3fb 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -7,10 +7,10 @@ build_make() { } build_deps() { - if [[ "${BUILD_32BIT}" == ON ]]; then + if test "x${BUILD_32BIT}" = xON ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi - if [[ "${FUNCTIONALTEST}" == "functionaltest-lua" ]]; then + if test "x${FUNCTIONALTEST}" = "xfunctionaltest-lua" ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi @@ -18,16 +18,15 @@ build_deps() { # If there is a valid cache and we're not forced to recompile, # use cached third-party dependencies. - if [[ -f "${CACHE_MARKER}" ]] && [[ "${BUILD_NVIM_DEPS}" != true ]]; then - if [[ "${TRAVIS_OS_NAME}" == osx ]]; then - local statcmd="stat -f '%Sm'" - else - local statcmd="stat -c '%y'" + if test -f "${CACHE_MARKER}" && test "x${BUILD_NVIM_DEPS}" != xtrue ; then + local statcmd="stat -c '%y'" + if test "x${TRAVIS_OS_NAME}" = xosx ; then + statcmd="stat -f '%Sm'" fi echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))." - mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" - mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" + mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" + mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" else mkdir -p "${DEPS_BUILD_DIR}" fi @@ -46,10 +45,10 @@ build_deps() { } prepare_build() { - if [[ -n "${CLANG_SANITIZER}" ]]; then + if test -n "${CLANG_SANITIZER}" ; then CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON" fi - if [[ "${BUILD_32BIT}" == ON ]]; then + if test "x${BUILD_32BIT}" = xON ; then CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi @@ -61,24 +60,24 @@ prepare_build() { build_nvim() { echo "Building nvim." - if ! top_make nvim; then + if ! top_make nvim ; then exit 1 fi - if [ "$CLANG_SANITIZER" != "TSAN" ]; then + if test "x$CLANG_SANITIZER" != xTSAN ; then echo "Building libnvim." - if ! top_make libnvim; then + if ! top_make libnvim ; then exit 1 fi echo "Building nvim-test." - if ! top_make nvim-test; then + if ! top_make nvim-test ; then exit 1 fi fi # Invoke nvim to trigger *San early. - if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall'); then + if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall') ; then asan_check "${LOG_DIR}" exit 1 fi diff --git a/ci/common/suite.sh b/ci/common/suite.sh index c4120c8584..9eba5ca664 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -151,12 +151,12 @@ run_test_wd() { } ended_successfully() { - if [[ -f "${FAIL_SUMMARY_FILE}" ]]; then + if test -f "${FAIL_SUMMARY_FILE}" ; then echo 'Test failed, complete summary:' cat "${FAIL_SUMMARY_FILE}" return 1 fi - if ! [[ -f "${END_MARKER}" ]] ; then + if ! test -f "${END_MARKER}" ; then echo 'ended_successfully called before end marker was touched' return 1 fi diff --git a/ci/common/test.sh b/ci/common/test.sh index d911d9bc18..0958e0505d 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -1,5 +1,5 @@ -source "${CI_DIR}/common/build.sh" -source "${CI_DIR}/common/suite.sh" +. "${CI_DIR}/common/build.sh" +. "${CI_DIR}/common/suite.sh" print_core() { local app="$1" @@ -9,7 +9,7 @@ print_core() { return 0 fi echo "======= Core file $core =======" - if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + if test "x${TRAVIS_OS_NAME}" = xosx ; then lldb -Q -o "bt all" -f "${app}" -c "${core}" else gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" @@ -23,13 +23,13 @@ check_core_dumps() { shift fi local app="${1:-${BUILD_DIR}/bin/nvim}" - if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + if test "x${TRAVIS_OS_NAME}" = xosx ; then local cores="$(find /cores/ -type f -print)" else local cores="$(find ./ -type f -name 'core.*' -print)" fi - if [ -z "${cores}" ]; then + if test -z "${cores}" ; then return fi local core @@ -61,7 +61,7 @@ check_logs() { cat "${log}" err=1 done - if [[ -n "${err}" ]]; then + if test -n "${err}" ; then fail 'logs' E 'Runtime errors detected.' fi } @@ -76,7 +76,7 @@ asan_check() { run_unittests() {( enter_suite unittests - ulimit -c unlimited + ulimit -c unlimited || true if ! build_make unittest ; then fail 'unittests' F 'Unit tests failed' fi @@ -86,7 +86,7 @@ run_unittests() {( run_functionaltests() {( enter_suite functionaltests - ulimit -c unlimited + ulimit -c unlimited || true if ! build_make ${FUNCTIONALTEST}; then fail 'functionaltests' F 'Functional tests failed' fi @@ -98,7 +98,7 @@ run_functionaltests() {( run_oldtests() {( enter_suite oldtests - ulimit -c unlimited + ulimit -c unlimited || true if ! make -C "${TRAVIS_BUILD_DIR}/src/nvim/testdir"; then reset fail 'oldtests' F 'Legacy tests failed' @@ -109,6 +109,26 @@ run_oldtests() {( exit_suite )} +check_runtime_files() {( + local test_name="$1" ; shift + local message="$1" ; shift + local tst="$1" ; shift + + cd runtime + for file in $(git ls-files "$@") ; do + # Check that test is not trying to work with files with spaces/etc + # Prefer failing the build over using more robust construct because files + # with IFS are not welcome. + if ! test -e "$file" ; then + fail "$test_name" E \ + "It appears that $file is only a part of the file name" + fi + if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then + fail "$test_name" F "$(printf "$message" "$file")" + fi + done +)} + install_nvim() {( enter_suite 'install_nvim' if ! build_make install ; then @@ -117,34 +137,32 @@ install_nvim() {( fi "${INSTALL_PREFIX}/bin/nvim" --version - "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' || { + if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then echo "Running ':help' in the installed nvim failed." echo "Maybe the helptags have not been generated properly." fail 'help' F 'Failed running :help' - } + fi - local genvimsynf=syntax/vim/generated.vim # Check that all runtime files were installed - for file in doc/tags $genvimsynf $( - cd runtime ; git ls-files | grep -e '.vim$' -e '.ps$' -e '.dict$' -e '.py$' -e '.tutor$' - ) ; do - if ! test -e "${INSTALL_PREFIX}/share/nvim/runtime/$file" ; then - fail 'runtime-install' F "It appears that $file is not installed." - fi - done + check_runtime_files \ + 'runtime-install' \ + 'It appears that %s is not installed.' \ + -e \ + '*.vim' '*.ps' '*.dict' '*.py' '*.tutor' + + # Check that some runtime files are installed and are executables + check_runtime_files \ + 'not-exe' \ + 'It appears that %s is not installed or is not executable.' \ + -x \ + '*.awk' '*.sh' '*.bat' # Check that generated syntax file has function names, #5060. + local genvimsynf=syntax/vim/generated.vim 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." fi - for file in $( - cd runtime ; git ls-files | grep -e '.awk$' -e '.sh$' -e '.bat$' - ) ; do - if ! test -x "${INSTALL_PREFIX}/share/nvim/runtime/$file" ; then - fail 'not-exe' F "It appears that $file is not installed or is not executable." - fi - done exit_suite )} -- cgit From 74d5705ca9de7ce0a1edef65590594a55c1a4ea3 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 22:17:34 +0300 Subject: ci: Source ci/common/test.sh in run_test_wd subshell --- ci/common/suite.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ci') diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 9eba5ca664..860e7f79ea 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -95,7 +95,9 @@ run_test_wd() { status_file="$status_file" \ sid_file="$sid_file" \ cmd="$cmd" \ + CI_DIR="$CI_DIR" \ sh -c ' + . "${CI_DIR}/common/test.sh" ps -o sid= > "$sid_file" ( ret=0 -- cgit From ee4daa65723df100ce58d132243747aad48d4f12 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 24 Apr 2017 23:11:13 +0300 Subject: ci: Remove `x` from `test x` --- ci/common/build.sh | 12 ++++++------ ci/common/suite.sh | 8 ++++---- ci/common/test.sh | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'ci') diff --git a/ci/common/build.sh b/ci/common/build.sh index 56c24bb3fb..8c2406698a 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -7,10 +7,10 @@ build_make() { } build_deps() { - if test "x${BUILD_32BIT}" = xON ; then + if test "${BUILD_32BIT}" = ON ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi - if test "x${FUNCTIONALTEST}" = "xfunctionaltest-lua" ; then + if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi @@ -18,9 +18,9 @@ build_deps() { # If there is a valid cache and we're not forced to recompile, # use cached third-party dependencies. - if test -f "${CACHE_MARKER}" && test "x${BUILD_NVIM_DEPS}" != xtrue ; then + if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then local statcmd="stat -c '%y'" - if test "x${TRAVIS_OS_NAME}" = xosx ; then + if test "${TRAVIS_OS_NAME}" = osx ; then statcmd="stat -f '%Sm'" fi echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))." @@ -48,7 +48,7 @@ prepare_build() { if test -n "${CLANG_SANITIZER}" ; then CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON" fi - if test "x${BUILD_32BIT}" = xON ; then + if test "${BUILD_32BIT}" = ON ; then CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi @@ -64,7 +64,7 @@ build_nvim() { exit 1 fi - if test "x$CLANG_SANITIZER" != xTSAN ; then + if test "$CLANG_SANITIZER" != "TSAN" ; then echo "Building libnvim." if ! top_make libnvim ; then exit 1 diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 860e7f79ea..a6fe7dd650 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -24,7 +24,7 @@ exit_suite() { echo "${FAIL_SUMMARY}" fi export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}" - if test "x$1" != "x--continue" ; then + if test "$1" != "--continue" ; then exit $FAILED else local saved_failed=$FAILED @@ -61,7 +61,7 @@ run_test() { run_test_wd() { local hang_ok= - if test "x$1" = "x--allow-hang" ; then + if test "$1" = "--allow-hang" ; then hang_ok=1 shift fi @@ -131,7 +131,7 @@ run_test_wd() { pkill -KILL -s$(cat "$sid_file") if test $restarts -eq 0 ; then - if test "x$hang_ok" = "x" ; then + if test -z "$hang_ok" ; then fail "$test_name" E "Test hang up" fi else @@ -140,7 +140,7 @@ run_test_wd() { fi else local new_failed="$(cat "$status_file")" - if test "x$new_failed" != "x0" ; then + if test "$new_failed" != "0" ; then fail "$test_name" F "Test failed in run_test_wd" fi break diff --git a/ci/common/test.sh b/ci/common/test.sh index 0958e0505d..a4b7680830 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -9,7 +9,7 @@ print_core() { return 0 fi echo "======= Core file $core =======" - if test "x${TRAVIS_OS_NAME}" = xosx ; then + if test "${TRAVIS_OS_NAME}" = osx ; then lldb -Q -o "bt all" -f "${app}" -c "${core}" else gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" @@ -23,7 +23,7 @@ check_core_dumps() { shift fi local app="${1:-${BUILD_DIR}/bin/nvim}" - if test "x${TRAVIS_OS_NAME}" = xosx ; then + if test "${TRAVIS_OS_NAME}" = osx ; then local cores="$(find /cores/ -type f -print)" else local cores="$(find ./ -type f -name 'core.*' -print)" -- cgit From 48fa42153acbf271db8edc94f94b524eb5b492e0 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 1 May 2017 06:45:24 +0300 Subject: ci: Fold output in travis web interface --- ci/common/suite.sh | 21 +++++++++++++++++++++ ci/common/test.sh | 5 +++++ ci/run_lint.sh | 19 ++++++++++++------- ci/run_tests.sh | 12 ++++++++---- 4 files changed, 46 insertions(+), 11 deletions(-) (limited to 'ci') 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 -- cgit From 1109ca7198a73dd26061817c6548410cb33debb4 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 1 May 2017 17:36:45 +0300 Subject: ci: Use \{1,\} in place of \+ --- ci/common/suite.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 54afa28be6..8feb642547 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -16,7 +16,7 @@ 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" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')" name="$(echo -n "$name" | sed 's/-$//')" echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}" } -- cgit From e4d0fa6e8d9b646c036780d6c5a7b2f2af988b65 Mon Sep 17 00:00:00 2001 From: ZyX Date: Mon, 1 May 2017 17:38:21 +0300 Subject: Do not trace in check_runtime_files --- ci/common/test.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'ci') diff --git a/ci/common/test.sh b/ci/common/test.sh index c987875cc0..55f76ca798 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -110,6 +110,7 @@ run_oldtests() {( )} check_runtime_files() {( + set +x local test_name="$1" ; shift local message="$1" ; shift local tst="$1" ; shift -- cgit From 685ca180f7c96f77a79c78d3b26bd003f8cd834c Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Sat, 18 Mar 2017 00:06:47 +0000 Subject: win: Terminal UI #6315 For CI builds unibilium is provided through msys2 packages, and libtermkey is built from source in third-party from equalsraf/libtermkey. In Windows we cannot read terminal input from the stdin file descriptor, instead use libuv's uv_tty API. It should handle key input and encoding. The UI suspend is not implemented for Windows, because the SIGSTP/SIGCONT do not exist in windows. Currently this is a NOOP. Closes #3902 Closes #6640 --- ci/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 9071c0864e..bc110396ef 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -17,7 +17,7 @@ set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH% :: Build third-party dependencies C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error -C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils gperf" || goto :error +C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error :: Setup python (use AppVeyor system python) C:\Python27\python.exe -m pip install neovim || goto :error -- cgit From b9dba14fa32f49b145d1d415f2e869140a2a6a5c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 3 May 2017 15:50:11 +0200 Subject: win: build: RelWithDebInfo --- ci/build.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index bc110396ef..c871c6b849 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -31,14 +31,14 @@ python3 -c "import neovim; print(str(neovim))" || goto :error mkdir .deps cd .deps -cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..\third-party\ || goto :error +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error mingw32-make VERBOSE=1 || goto :error cd .. :: Build Neovim mkdir build cd build -cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUSTED_OUTPUT_TYPE=nvim -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error mingw32-make VERBOSE=1 || goto :error bin\nvim --version || goto :error @@ -46,8 +46,8 @@ bin\nvim --version || goto :error mingw32-make functionaltest VERBOSE=1 || goto :error :: Build artifacts -cpack -G ZIP -C Release -if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C Release +cpack -G ZIP -C RelWithDebInfo +if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo goto :EOF :error -- cgit