diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-03-26 16:50:57 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-03-26 16:50:57 +0100 |
commit | 3ed9efc2b15b624268bcce4e4d312fb35840a12b (patch) | |
tree | 5245d20c2fd3a5e2822f766ece99af732bfde907 /src/testdir/runtest.vim | |
parent | 7851b1ca992222880df1314684a790f293e11896 (diff) |
patch 8.2.0454: some tests fail when the system is slowv8.2.0454
Problem: Some tests fail when the system is slow.
Solution: Make the run number global, use in the test to increase the
waiting time. (closes #5841)
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r-- | src/testdir/runtest.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index 5850218688..0d603231aa 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -406,7 +406,7 @@ for s:test in sort(s:tests) set belloff=all let prev_error = '' let total_errors = [] - let run_nr = 1 + let g:run_nr = 1 " A test can set test_is_flaky to retry running the test. let test_is_flaky = 0 @@ -423,10 +423,10 @@ for s:test in sort(s:tests) call add(s:messages, 'Found errors in ' . s:test . ':') call extend(s:messages, v:errors) - call add(total_errors, 'Run ' . run_nr . ':') + call add(total_errors, 'Run ' . g:run_nr . ':') call extend(total_errors, v:errors) - if run_nr == 5 || prev_error == v:errors[0] + if g:run_nr == 5 || prev_error == v:errors[0] call add(total_errors, 'Flaky test failed too often, giving up') let v:errors = total_errors break @@ -441,7 +441,7 @@ for s:test in sort(s:tests) let prev_error = v:errors[0] let v:errors = [] - let run_nr += 1 + let g:run_nr += 1 call RunTheTest(s:test) |