Save the log file for failed tests
This commit is contained in:
parent
34df47fe35
commit
0464b456a8
2 changed files with 8 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -13,3 +13,5 @@ package/
|
||||||
README.md.orig.*
|
README.md.orig.*
|
||||||
README.md.toc.*
|
README.md.toc.*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.vimspector.log
|
||||||
|
support/test/csharp/*.exe*
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,11 @@ func AfterTheTest()
|
||||||
call add(s:errors, 'Found errors in ' . s:testid . ':')
|
call add(s:errors, 'Found errors in ' . s:testid . ':')
|
||||||
call extend(s:errors, v:errors)
|
call extend(s:errors, v:errors)
|
||||||
let v:errors = []
|
let v:errors = []
|
||||||
|
|
||||||
|
let log = readfile( expand( '~/.vimspector.log' ) )
|
||||||
|
let logfile = s:testid . '.vimspector.log'
|
||||||
|
call writefile( log, logfile, 's' )
|
||||||
|
call add( s:messages, 'Wrote log for failed test: ' . logfile )
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
|
@ -314,7 +319,7 @@ for s:test in sort(s:tests)
|
||||||
|
|
||||||
" Repeat a flaky test. Give up when:
|
" Repeat a flaky test. Give up when:
|
||||||
" - it fails again with the same message
|
" - it fails again with the same message
|
||||||
" - it fails five times (with a different mesage)
|
" - it fails five times (with a different message)
|
||||||
if len(v:errors) > 0
|
if len(v:errors) > 0
|
||||||
\ && (index(s:flaky_tests, s:test) >= 0
|
\ && (index(s:flaky_tests, s:test) >= 0
|
||||||
\ || v:errors[0] =~ s:flaky_errors_re)
|
\ || v:errors[0] =~ s:flaky_errors_re)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue