test: support running functionaltests in parallel by directory (#37918)

Define a CMake target for every subdirectory of test/functional that
contains functional tests, and a functionaltest_parallel target that
depends on all those targets, allowing multiple test runners to run in
parallel.

On CI, use at most 2 parallel test runners, as using more may increase
system load and make tests unstable.
This commit is contained in:
zeertzjq
2026-02-18 15:56:50 +08:00
committed by GitHub
parent 9492df027d
commit 496eca22b3
13 changed files with 206 additions and 102 deletions

View File

@@ -33,9 +33,15 @@ describe('executable()', function()
end)
it('stdpath respects shellslash', function()
eq([[build\Xtest_xdg\share\nvim-data]], call('fnamemodify', call('stdpath', 'data'), ':.'))
t.matches(
[[build\Xtest_xdg[%w_]*\share\nvim%-data]],
call('fnamemodify', call('stdpath', 'data'), ':.')
)
command('set shellslash')
eq('build/Xtest_xdg/share/nvim-data', call('fnamemodify', call('stdpath', 'data'), ':.'))
t.matches(
'build/Xtest_xdg[%w_]*/share/nvim%-data',
call('fnamemodify', call('stdpath', 'data'), ':.')
)
end)
end