diff options
Diffstat (limited to 'ci')
-rw-r--r-- | ci/build.ps1 | 11 | ||||
-rw-r--r-- | ci/common/build.sh | 2 | ||||
-rwxr-xr-x | ci/common/submit_coverage.sh | 4 | ||||
-rw-r--r-- | ci/common/suite.sh | 19 | ||||
-rw-r--r-- | ci/common/test.sh | 5 | ||||
-rwxr-xr-x | ci/install.sh | 8 | ||||
-rwxr-xr-x | ci/run_lint.sh | 24 | ||||
-rwxr-xr-x | ci/run_tests.sh | 8 |
8 files changed, 26 insertions, 55 deletions
diff --git a/ci/build.ps1 b/ci/build.ps1 index a81d351bc6..ef5ba3bf2d 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -86,19 +86,10 @@ elseif ($compiler -eq 'MSVC') { } if (-not $NoTests) { - # Setup python (use AppVeyor system python) - - # Disambiguate python3, if needed - if (-not (Test-Path -Path C:\hostedtoolcache\windows\Python\3.5.4\x64\python3.exe) ) { - move C:\hostedtoolcache\windows\Python\3.5.4\x64\python.exe C:\hostedtoolcache\windows\Python\3.5.4\x64\python3.exe - } - $env:PATH = "C:\hostedtoolcache\windows\Python\2.7.18\x64;C:\hostedtoolcache\windows\Python\3.5.4\x64;$env:PATH" - + python -m ensurepip python -m pip install pynvim ; exitIfFailed - python3 -m pip install pynvim ; exitIfFailed # Sanity check python -c "import pynvim; print(str(pynvim))" ; exitIfFailed - python3 -c "import pynvim; print(str(pynvim))" ; exitIfFailed gem.cmd install --pre neovim Get-Command -CommandType Application neovim-ruby-host.bat diff --git a/ci/common/build.sh b/ci/common/build.sh index 0ee4b7493f..c44c234274 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -8,8 +8,6 @@ _stat() { top_make() { printf '%78s\n' | tr ' ' '=' - # Travis has 1.5 virtual cores according to: - # http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM ninja "$@" } diff --git a/ci/common/submit_coverage.sh b/ci/common/submit_coverage.sh index 9c7887de0b..cb6ab62b5b 100755 --- a/ci/common/submit_coverage.sh +++ b/ci/common/submit_coverage.sh @@ -18,12 +18,12 @@ if ! [ -f "$codecov_sh" ]; then curl --retry 5 --silent --fail -o "$codecov_sh" https://codecov.io/bash chmod +x "$codecov_sh" - python3 -m pip install --quiet --user gcovr + python -m pip install --quiet --user gcovr fi ( cd build - python3 -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root .. --delete -o ../coverage.xml --xml + python -m gcovr --branches --exclude-unreachable-branches --print-summary -j 2 --exclude '.*/auto/.*' --root .. --delete -o ../coverage.xml --xml ) # Upload to codecov. diff --git a/ci/common/suite.sh b/ci/common/suite.sh index 561849ce2d..f6a8c22d21 100644 --- a/ci/common/suite.sh +++ b/ci/common/suite.sh @@ -73,13 +73,8 @@ fail() { run_test() { local cmd="$1" - test $# -gt 0 && shift - local test_name="$1" - : ${test_name:=$cmd} - test $# -gt 0 && shift - if ! eval "$cmd" ; then - fail "${test_name}" "$@" - fi + local test_name="$2" + eval "$cmd" || fail "$test_name" } ended_successfully() { @@ -99,3 +94,13 @@ end_tests() { touch "${END_MARKER}" ended_successfully } + +run_suite() { + local command="$1" + local suite_name="$2" + + enter_suite "$suite_name" + run_test "$command" "$suite_name" + exit_suite --continue +} + diff --git a/ci/common/test.sh b/ci/common/test.sh index 92c15c8ba1..798f2926c6 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -182,8 +182,3 @@ 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/install.sh b/ci/install.sh index bd42274b49..894e090de2 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -4,12 +4,8 @@ set -e set -o pipefail # Use default CC to avoid compilation problems when installing Python modules. -echo "Install neovim module for Python 3." -CC=cc python3 -m pip -q install --user --upgrade pynvim -if python2 -m pip -c True 2>&1; then - echo "Install neovim module for Python 2." - CC=cc python2 -m pip -q install --user --upgrade pynvim -fi +echo "Install neovim module for Python." +CC=cc python -m pip -q install --user --upgrade pynvim echo "Install neovim RubyGem." gem install --no-document --bindir "$HOME/.local/bin" --user-install --pre neovim diff --git a/ci/run_lint.sh b/ci/run_lint.sh index 314976edc2..607ffa233a 100755 --- a/ci/run_lint.sh +++ b/ci/run_lint.sh @@ -8,24 +8,10 @@ CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/suite.sh" -enter_suite 'clint' -run_test 'make clint-full' clint -exit_suite --continue - -enter_suite 'lualint' -run_test 'make lualint' lualint -exit_suite --continue - -enter_suite 'pylint' -run_test 'make pylint' pylint -exit_suite --continue - -enter_suite 'shlint' -run_test 'make shlint' shlint -exit_suite --continue - -enter_suite single-includes -run_test 'make check-single-includes' single-includes -exit_suite --continue +run_suite 'make clint-full' 'clint' +run_suite 'make lualint' 'lualint' +run_suite 'make pylint' 'pylint' +run_suite 'make shlint' 'shlint' +run_suite 'make check-single-includes' 'single-includes' end_tests diff --git a/ci/run_tests.sh b/ci/run_tests.sh index c175910da5..6c310ccc76 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -23,13 +23,13 @@ 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 if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then - run_test run_unittests + run_test run_unittests unittests fi - run_test run_functionaltests + run_test run_functionaltests functionaltests fi -run_test run_oldtests +run_test run_oldtests oldtests -run_test install_nvim +run_test install_nvim install_nvim exit_suite --continue |