Skip to content

a few test improvements#16599

Closed
chrisbra wants to merge 6 commits intovim:masterfrom
chrisbra:test-improvements
Closed

a few test improvements#16599
chrisbra wants to merge 6 commits intovim:masterfrom
chrisbra:test-improvements

Conversation

@chrisbra
Copy link
Copy Markdown
Member

@chrisbra chrisbra commented Feb 8, 2025

A few test improvements:

Signed-off-by: Christian Brabandt <cb@256bit.org>
@chrisbra chrisbra force-pushed the test-improvements branch 3 times, most recently from e6a669c to d4f3ec8 Compare February 9, 2025 15:35
related: actions/runner-images#11512

Signed-off-by: Christian Brabandt <cb@256bit.org>
call a terminal callback function when finished printing, instead of
using term_wait(). This causes some timeouts on CI with the macos
runners

related: vim#16552

Signed-off-by: Christian Brabandt <cb@256bit.org>

wait longer

Signed-off-by: Christian Brabandt <cb@256bit.org>

don't call terminal api on windows
…Windows

For some reasons, on Windows, python3.13 does no longer exit with the
expected return code. So let's check for either exit code 1 or 123 in
tests Test_terminal_duplicate_eof_arg() and Test_terminal_eof_arg()

related: python/cpython#129900

Signed-off-by: Christian Brabandt <cb@256bit.org>
So check for the expected output in both the second last line and the
last line

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra added a commit that referenced this pull request Feb 9, 2025
Problem:  tests: plugin tests are named inconsistently
Solution: group them under a common 'plugin' prefix

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra added a commit that referenced this pull request Feb 9, 2025
Problem:  tests: No check when tests are run under Github actions
Solution: Add the CheckGithubActions check command and skip test if
          needed

related: #16599
related: actions/runner-images#11512

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra added a commit that referenced this pull request Feb 9, 2025
Problem:  tests: test_terminwscroll_topline2 unreliable
          (Yee Cheng Chin)
Solution: instead of using term_wait() with a specific time, use
          terminal-api and to wait until the terminal is finished

call a terminal callback function when finished printing, instead of
using term_wait(), with a defined time, which caused timeouts on CI
with the macos runners

Unfortunately I couldn't figure out how to call the terminal-api on Windows,
so skip the test on Windows. cmd.com echo didn's seem to work and
neither did trying to use python, but perhaps it was just me fighting
with the terminal quoting rules 🤷

related: #16599
related: #16552

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra added a commit that referenced this pull request Feb 9, 2025
Problem:  tests: timeout might be a bit too small
Solution: increase the test timeout from 30 to 45 seconds

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
chrisbra added a commit that referenced this pull request Feb 9, 2025
…ndows

Problem:  tests: fix expected return code for python 3.13 on Windows
Solution: Check for return code 1 or 123 on Windows

There is a regression with python 3.13 on Windows, that it no longer
prints the requested error code, but instead exits with return code 1,
which  breaks the test-suite.

So let's check for either exit code 1 or 123 in tests
Test_terminal_duplicate_eof_arg() and Test_terminal_eof_arg()

This will probably be fixed on the Python side, see the pull request
python/cpython#129901 but in the meantime, let's allow both error codes.

related: #16599
related: python/cpython#129900

Signed-off-by: Christian Brabandt <cb@256bit.org>
@chrisbra chrisbra closed this in 3cfac59 Feb 9, 2025
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 10, 2025
Problem:  tests: plugin tests are named inconsistently
Solution: group them under a common 'plugin' prefix

related: vim/vim#16599

vim/vim@934d9ab

Co-authored-by: Christian Brabandt <cb@256bit.org>
@zeertzjq
Copy link
Copy Markdown
Member

Should test_matchparen.vim be renamed as well?

zeertzjq added a commit to neovim/neovim that referenced this pull request Feb 10, 2025
…tly (#32388)

Problem:  tests: plugin tests are named inconsistently
Solution: group them under a common 'plugin' prefix

related: vim/vim#16599

vim/vim@934d9ab

Co-authored-by: Christian Brabandt <cb@256bit.org>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 10, 2025
Problem:  tests: timeout might be a bit too small
Solution: increase the test timeout from 30 to 45 seconds

related: vim/vim#16599

vim/vim@ec7a4e4

Co-authored-by: Christian Brabandt <cb@256bit.org>
@chrisbra
Copy link
Copy Markdown
Member Author

Oh yes, I missed that one

chrisbra added a commit that referenced this pull request Feb 10, 2025
Problem:  tests: matchparen plugin test wrongly named
          (zeertzjq)
Solution: rename test_matchparen to test_plugin_matchparen
          to be consistent with the other plugin tests

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 10, 2025
Problem:  tests: matchparen plugin test wrongly named
          (zeertzjq)
Solution: rename test_matchparen to test_plugin_matchparen
          to be consistent with the other plugin tests

related: vim/vim#16599

vim/vim@7de6b1b

Co-authored-by: Christian Brabandt <cb@256bit.org>
zeertzjq added a commit to neovim/neovim that referenced this pull request Feb 11, 2025
Problem:  tests: matchparen plugin test wrongly named
          (zeertzjq)
Solution: rename test_matchparen to test_plugin_matchparen
          to be consistent with the other plugin tests

related: vim/vim#16599

vim/vim@7de6b1b

Co-authored-by: Christian Brabandt <cb@256bit.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants