aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-09-21 10:06:22 -0400
committerGitHub <noreply@github.com>2016-09-21 10:06:22 -0400
commit6cf24be29559c3afe779014ee860d115a4a31e60 (patch)
tree14ead6c7e16282dbbd733e4867b1991e3d40b23d
parentbaf91a455c50ce146230c4cd32c6aedcfa7b9f80 (diff)
parenta4cb500d988bd294375d497b56977271c7e08615 (diff)
downloadrneovim-6cf24be29559c3afe779014ee860d115a4a31e60.tar.gz
rneovim-6cf24be29559c3afe779014ee860d115a4a31e60.tar.bz2
rneovim-6cf24be29559c3afe779014ee860d115a4a31e60.zip
Merge pull request #5038 from prollings/vim-7.4.1477
vim-patch:7.4.1477
-rw-r--r--src/nvim/testdir/runtest.vim43
-rw-r--r--src/nvim/version.c2
2 files changed, 29 insertions, 16 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index 74bbf418fa..f9b5be1c81 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -47,6 +47,25 @@ lang mess C
" Always use forward slashes.
set shellslash
+function RunTheTest(test)
+ echo 'Executing ' . test
+ if exists("*SetUp")
+ call SetUp()
+ endif
+
+ call add(s:messages, 'Executing ' . test)
+ let s:done += 1
+ try
+ exe 'call ' . test
+ catch
+ call add(v:errors, 'Caught exception in ' . test . ': ' . v:exception . ' @ ' . v:throwpoint)
+ endtry
+
+ if exists("*TearDown")
+ call TearDown()
+ endif
+endfunc
+
" Source the test script. First grab the file name, in case the script
" navigates away.
let testname = expand('%')
@@ -66,6 +85,9 @@ else
endtry
endif
+" Names of flaky tests.
+let s:flaky = []
+
" Locate Test_ functions and execute them.
set nomore
redir @q
@@ -80,19 +102,13 @@ endif
" Execute the tests in alphabetical order.
for test in sort(tests)
- echo 'Executing ' . test
- if exists("*SetUp")
- call SetUp()
- endif
+ call RunTheTest(test)
- call add(messages, 'Executing ' . test)
- let done += 1
- try
- exe 'call ' . test
- catch
- let fail += 1
- call add(v:errors, 'Caught exception in ' . test . ': ' . v:exception . ' @ ' . v:throwpoint)
- endtry
+ if len(v:errors) > 0 && index(flaky, test) >= 0
+ call add(messages, 'Flaky test failed, running it again')
+ let v:errors = []
+ call RunTheTest(test)
+ endif
if len(v:errors) > 0
let fail += 1
@@ -101,9 +117,6 @@ for test in sort(tests)
let v:errors = []
endif
- if exists("*TearDown")
- call TearDown()
- endif
endfor
if fail == 0
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 63acd22514..685a2a843b 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -966,7 +966,7 @@ static int included_patches[] = {
1480,
1479,
1478,
- // 1477,
+ 1477,
// 1476 NA
// 1475 NA
// 1474 NA