mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test: avoid writing ~/.bash_history #15621
Problem: - If I run 'make test' on Linux (Fedora), a few lines like /path/to/neovim/build/bin/shell-test REP 31 line /path/to/neovim/build/bin/shell-test REP 41 line are written to my ~/.bash_history. These comes from from test/functional/terminal/scrollback_spec.lua. - If $HISTFILE is unset, shell will not write to history file. But bash sets $HISTFILE to default value (~/.bash_history) if it is unset. - Unknown how to set an env var to empty string in CMake. These do NOT work: set(HISTFILE "") set(ENV{HISTFILE} "") unset(ENV{HISTFILE}) Solution: Set HISTFILE=/dev/null
This commit is contained in:
commit
5e22fdd9cc
@ -49,6 +49,9 @@ endif()
|
||||
set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${TEST_PATH}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{TMPDIR})
|
||||
|
||||
# HISTFILE: do not write into user's ~/.bash_history
|
||||
set(ENV{HISTFILE} "/dev/null")
|
||||
|
||||
if(NOT DEFINED ENV{TEST_TIMEOUT} OR "$ENV{TEST_TIMEOUT}" STREQUAL "")
|
||||
set(ENV{TEST_TIMEOUT} 1200)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user