neovim/cmake
Sergey Slipchenko f859d16aea
fix(tests): set SHELL=sh #24941
Problem:
Some tests fail with $SHELL=fish #6172
Related: https://github.com/neovim/neovim/pull/6176

Solution:
Replace "echo -n" with "printf", because "echo" in sh may be provided
as a shell builtin, which does not accept an "-n" flag to avoid a
trailing newline (e.g. on macos). "printf" is more portable (defined by
POSIX) and it does not output a trailing newline by itself.
Fixes #6172

TODO:
Other test failures may be related to "session leader" issue: https://github.com/neovim/neovim/issues/2354
Checked by running `:terminal ./build/bin/tty-test` from Nvim with
`shell=/bin/fish` (inherited from `$SHELL`) and it indeed complains
about "process does not own the terminal". With `shell=sh` it doesn't complain. And
unsetting `$SHELL` seems to make `nvim` to fall back to `shell=sh`.

    FAILED   test/functional/terminal/tui_spec.lua @ 1017: TUI paste: terminal mode
    test/functional/terminal/tui_spec.lua:1024: Row 1 did not match.
    Expected:
      |*tty ready                                         |
      |*{1: }                                                 |
      |*                                                  |
      |                                                  |
      |{5:^^^^^^^                                           }|
      |{3:-- TERMINAL --}                                    |
      |{3:-- TERMINAL --}                                    |
    Actual:
      |*process does not own the terminal                 |
      |*                                                  |
      |*[Process exited 2]{1: }                               |
      |                                                  |
      |{5:^^^^^^^                                           }|
      |{3:-- TERMINAL --}                                    |
      |{3:-- TERMINAL --}                                    |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
        test/functional/ui/screen.lua:622: in function '_wait'
        test/functional/ui/screen.lua:352: in function 'expect'
        test/functional/terminal/tui_spec.lua:1024: in function <test/functional/terminal/tui_spec.lua:1017>

    FAILED   test/functional/terminal/tui_spec.lua @ 1551: TUI forwards :term palette colors with termguicolors
    test/functional/terminal/tui_spec.lua:1567: Row 1 did not match.
    Expected:
      |*{1:t}ty ready                                         |
      |                                                  |
      |*                                                  |
      |                                                  |
      |{2:^^^^^^^                                           }|
      |                                                  |
      |{3:-- TERMINAL --}                                    |
    Actual:
      |*{1:p}rocess does not own the terminal                 |
      |                                                  |
      |*[Process exited 2]                                |
      |                                                  |
      |{2:^^^^^^^                                           }|
      |                                                  |
      |{3:-- TERMINAL --}                                    |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
        test/functional/ui/screen.lua:622: in function '_wait'
        test/functional/ui/screen.lua:352: in function 'expect'
        test/functional/terminal/tui_spec.lua:1567: in function <test/functional/terminal/tui_spec.lua:1551>
2023-09-11 10:01:00 -07:00
..
ConvertPo.cmake build: cmake cleanup 2023-05-13 12:12:29 +02:00
Deps.cmake build: download busted from own neovim/deps repository 2023-09-03 00:38:10 +02:00
FindIconv.cmake build: cmake cleanup (#22251) 2023-03-02 22:50:43 +01:00
FindLibintl.cmake build: cmake cleanup (#22251) 2023-03-02 22:50:43 +01:00
FindLibtermkey.cmake build: cmake cleanup (#22251) 2023-03-02 22:50:43 +01:00
FindLibuv.cmake build: cmake cleanup 2023-05-13 12:12:29 +02:00
FindLibvterm.cmake build: cmake cleanup (#22251) 2023-03-02 22:50:43 +01:00
FindLpeg.cmake build: various fixes 2023-09-04 00:00:26 +02:00
FindLuajit.cmake build: various fixes 2023-09-04 00:00:26 +02:00
FindLuv.cmake build: various fixes 2023-09-04 00:00:26 +02:00
FindMsgpack.cmake build(deps): bump msgpack-c to v6.0.0 (#22522) 2023-03-04 17:26:24 +01:00
FindTreesitter.cmake feat(treesitter): add support for setting query depths 2023-05-11 11:13:32 +01:00
FindUnibilium.cmake refactor(build): graduate unibilium VAR_FROM feature from 2017 2023-03-03 14:26:11 +01:00
Format.cmake build: don't format deleted files 2023-05-18 16:28:46 +02:00
GenerateVersion.cmake build: various fixes 2023-09-04 00:00:26 +02:00
InstallHelpers.cmake build: cmake cleanup 2023-05-13 12:12:29 +02:00
PreventInTreeBuilds.cmake
RunTests.cmake fix(tests): set SHELL=sh #24941 2023-09-11 10:01:00 -07:00
UninstallHelper.cmake
Util.cmake ci: introduce CI_LINT option 2023-06-24 00:29:53 +02:00
WindowsDllCopy.cmake build: various fixes 2023-09-04 00:00:26 +02:00