diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-29 16:36:54 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-07-29 23:51:42 +0200 |
commit | a118134af1ef08884dfceb9e9cd9bf2ba662b7d8 (patch) | |
tree | 74fc8964b49ee58b24f8204c3d9224b83d870f8c /src | |
parent | cca6d40ed6fcc929a6d215479455da9f60673bcb (diff) | |
download | rneovim-a118134af1ef08884dfceb9e9cd9bf2ba662b7d8.tar.gz rneovim-a118134af1ef08884dfceb9e9cd9bf2ba662b7d8.tar.bz2 rneovim-a118134af1ef08884dfceb9e9cd9bf2ba662b7d8.zip |
test/legacy: avoid TSAN CI build hang
This delete() sometimes hangs the TSAN build. Work around it by using
a unique filename. Do it at the start instead of the end, for hygiene
(though it doesn't actually matter on CI, it helps local dev).
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_normal.vim | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index 6261625801..4747d5704d 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -1255,21 +1255,27 @@ func! Test_normal22_zet() " Test for ZZ " let shell = &shell " let &shell = 'sh' - call writefile(['1', '2'], 'Xfile') + + " Remove any stale test files from previous run. + for file in ['Xfile_Test_normal22_zet'] + call delete(file) + endfor + + call writefile(['1', '2'], 'Xfile_Test_normal22_zet') let args = ' --headless -u NONE -N -U NONE -i NONE --noplugins' - call system(v:progpath . args . ' -c "%d" -c ":norm! ZZ" Xfile') - let a = readfile('Xfile') + call system(v:progpath . args . ' -c "%d" -c ":norm! ZZ" Xfile_Test_normal22_zet') + let a = readfile('Xfile_Test_normal22_zet') call assert_equal([], a) " Test for ZQ - call writefile(['1', '2'], 'Xfile') - call system(v:progpath . args . ' -c "%d" -c ":norm! ZQ" Xfile') - let a = readfile('Xfile') + call writefile(['1', '2'], 'Xfile_Test_normal22_zet') + call system(v:progpath . args . ' -c "%d" -c ":norm! ZQ" Xfile_Test_normal22_zet') + let a = readfile('Xfile_Test_normal22_zet') call assert_equal(['1', '2'], a) - " clean up - for file in ['Xfile'] - call delete(file) - endfor + " Nvim: This sometimes hangs the TSAN build. + " for file in ['Xfile_Test_normal22_zet'] + " call delete(file) + " endfor " let &shell = shell endfunc |