mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Stop 'ksh -i' unit tests affecting user command history
Several regression tests invoke an "interactive" shell using 'ksh -i'. This records all the commands tested in the shell's history file. By default, that is the user's history file, ~/.sh_history. As ksh continuously synchronises history among instances, a ksh user who ran the regression tests ended up with a number of mysterious extra commands in their command history. src/cmd/ksh93/tests/shtests: - Before running any tests, set and export HISTFILE to a new history file in the temporary files directory.
This commit is contained in:
parent
5312a59d5a
commit
aff63e382d
1 changed files with 3 additions and 0 deletions
|
@ -293,6 +293,9 @@ then trap 'printf "\nTemporary files left in: %s\n" "$tmp"' EXIT
|
|||
else trap 'cd / && rm -rf "$tmp"' EXIT
|
||||
fi
|
||||
|
||||
# for interactive shell ('ksh -i') tests: avoid affecting ~/.sh_history
|
||||
export HISTFILE=$tmp/sh_history
|
||||
|
||||
if (( compile ))
|
||||
then if whence $SHCOMP > /dev/null
|
||||
then :
|
||||
|
|
Loading…
Reference in a new issue