Merge #9095 'CI/travis/macOS: fix missing pip3'

This commit is contained in:
Justin M. Keyes 2018-10-13 15:59:49 -07:00 committed by GitHub
commit c9baaa9200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 19 deletions

View File

@ -69,10 +69,10 @@ jobs:
env: BUILD_32BIT=ON env: BUILD_32BIT=ON
- os: osx - os: osx
compiler: clang compiler: clang
osx_image: xcode7.3 # macOS 10.11 osx_image: xcode9.4 # macOS 10.13
- os: osx - os: osx
compiler: gcc compiler: gcc
osx_image: xcode7.3 # macOS 10.11 osx_image: xcode9.4 # macOS 10.13
- os: linux - os: linux
env: CI_TARGET=lint env: CI_TARGET=lint
- stage: Flaky builds - stage: Flaky builds

View File

@ -8,7 +8,9 @@ if [[ "${CI_TARGET}" == lint ]]; then
fi fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
brew update >/dev/null brew update
echo "Upgrade Python 3"
>/dev/null brew upgrade python
fi fi
echo 'python info:' echo 'python info:'
@ -24,17 +26,15 @@ echo 'python info:'
) | sed 's/^/ /' ) | sed 's/^/ /'
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
echo "Upgrade Python 3." echo "Upgrade Python 3 pip"
brew upgrade python
echo "Upgrade Python 3 pip."
pip3 -q install --user --upgrade pip pip3 -q install --user --upgrade pip
else else
echo "Upgrade Python 2 pip." echo "Upgrade Python 2 pip"
pip2.7 -q install --user --upgrade pip python2.7 -m pip -q install --user --upgrade pip
echo "Upgrade Python 3 pip." echo "Upgrade Python 3 pip"
# Allow failure. pyenv pip3 on travis is broken: # Allow failure. pyenv pip3 on travis is broken:
# https://github.com/travis-ci/travis-ci/issues/8363 # https://github.com/travis-ci/travis-ci/issues/8363
pip3 -q install --user --upgrade pip || true python3 -m pip -q install --user --upgrade pip || true
fi fi
echo "Install node (LTS)" echo "Install node (LTS)"

View File

@ -34,8 +34,10 @@ check_core_dumps() {
local app="${1:-${BUILD_DIR}/bin/nvim}" local app="${1:-${BUILD_DIR}/bin/nvim}"
if test "${TRAVIS_OS_NAME}" = osx ; then if test "${TRAVIS_OS_NAME}" = osx ; then
local cores="$(find /cores/ -type f -print)" local cores="$(find /cores/ -type f -print)"
local _sudo='sudo'
else else
local cores="$(find ./ -type f -name 'core.*' -print)" local cores="$(find ./ -type f -name 'core.*' -print)"
local _sudo=
fi fi
if test -z "${cores}" ; then if test -z "${cores}" ; then
@ -45,7 +47,7 @@ check_core_dumps() {
for core in $cores; do for core in $cores; do
if test "$del" = "1" ; then if test "$del" = "1" ; then
print_core "$app" "$core" >&2 print_core "$app" "$core" >&2
rm "$core" "$_sudo" rm "$core"
else else
print_core "$app" "$core" print_core "$app" "$core"
fi fi

View File

@ -18,14 +18,14 @@ fi
echo "Install neovim module for Python 3." echo "Install neovim module for Python 3."
# Allow failure. pyenv pip3 on travis is broken: # Allow failure. pyenv pip3 on travis is broken:
# https://github.com/travis-ci/travis-ci/issues/8363 # https://github.com/travis-ci/travis-ci/issues/8363
CC=cc pip3 -q install --user --upgrade neovim || true CC=cc python3 -m pip -q install --user --upgrade neovim || true
if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then
# Update PATH for pip. # Update PATH for pip.
export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH" export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
# Use default CC to avoid compilation problems when installing Python modules. # Use default CC to avoid compilation problems when installing Python modules.
echo "Install neovim module for Python 2." echo "Install neovim module for Python 2."
CC=cc pip2.7 -q install --user --upgrade neovim CC=cc python2.7 -m pip -q install --user --upgrade neovim
echo "Install neovim RubyGem." echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.2.0" neovim gem install --no-document --version ">= 0.2.0" neovim

View File

@ -20,9 +20,9 @@ func Test_oneshot()
let slept = WaitFor('g:val == 1') let slept = WaitFor('g:val == 1')
call assert_equal(1, g:val) call assert_equal(1, g:val)
if has('reltime') if has('reltime')
call assert_inrange(40, 100, slept) call assert_inrange(40, 120, slept)
else else
call assert_inrange(20, 100, slept) call assert_inrange(20, 120, slept)
endif endif
endfunc endfunc
@ -39,6 +39,7 @@ func Test_repeat_three()
endfunc endfunc
func Test_repeat_many() func Test_repeat_many()
call timer_stopall()
let g:val = 0 let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': -1}) let timer = timer_start(50, 'MyHandler', {'repeat': -1})
sleep 200m sleep 200m
@ -89,6 +90,7 @@ func Test_info()
endfunc endfunc
func Test_stopall() func Test_stopall()
call timer_stopall()
let id1 = timer_start(1000, 'MyHandler') let id1 = timer_start(1000, 'MyHandler')
let id2 = timer_start(2000, 'MyHandler') let id2 = timer_start(2000, 'MyHandler')
let info = timer_info() let info = timer_info()
@ -161,6 +163,7 @@ func StopTimerAll(timer)
endfunc endfunc
func Test_stop_all_in_callback() func Test_stop_all_in_callback()
call timer_stopall()
let g:timer1 = timer_start(10, 'StopTimerAll') let g:timer1 = timer_start(10, 'StopTimerAll')
let info = timer_info() let info = timer_info()
call assert_equal(1, len(info)) call assert_equal(1, len(info))

View File

@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each) local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen') local Screen = require('test.functional.ui.screen')
local ok, feed, eq, eval = helpers.ok, helpers.feed, helpers.eq, helpers.eval local feed, eq, eval = helpers.feed, helpers.eq, helpers.eval
local source, nvim_async, run = helpers.source, helpers.nvim_async, helpers.run local source, nvim_async, run = helpers.source, helpers.nvim_async, helpers.run
local clear, command, funcs = helpers.clear, helpers.command, helpers.funcs local clear, command, funcs = helpers.clear, helpers.command, helpers.funcs
local curbufmeths = helpers.curbufmeths local curbufmeths = helpers.curbufmeths
@ -72,7 +72,8 @@ describe('timers', function()
run(nil, nil, nil, 300) run(nil, nil, nil, 300)
feed("<cr>") feed("<cr>")
local diff = eval("g:val") - count local diff = eval("g:val") - count
ok(0 <= diff and diff <= 4) assert(0 <= diff and diff <= 4,
'expected (0 <= diff <= 4), got: '..tostring(diff))
end) end)
it('are triggered in blocking getchar() call', function() it('are triggered in blocking getchar() call', function()
@ -81,7 +82,7 @@ describe('timers', function()
run(nil, nil, nil, 300) run(nil, nil, nil, 300)
feed("c") feed("c")
local count = eval("g:val") local count = eval("g:val")
ok(count >= 4) assert(count >= 4, 'expected count >= 4, got: '..tostring(count))
eq(99, eval("g:c")) eq(99, eval("g:c"))
end) end)
@ -142,9 +143,10 @@ describe('timers', function()
local count = eval("g:val") local count = eval("g:val")
run(nil, nil, nil, 300) run(nil, nil, nil, 300)
local count2 = eval("g:val") local count2 = eval("g:val")
ok(4 <= count and count <= 7)
-- when count is eval:ed after timer_stop this should be non-racy -- when count is eval:ed after timer_stop this should be non-racy
eq(count, count2) eq(count, count2)
assert(4 <= count and count <= 7,
'expected (4 <= count <= 7), got: '..tostring(count))
end) end)
it('can be stopped from the handler', function() it('can be stopped from the handler', function()