diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-21 12:05:16 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2025-05-21 21:27:47 +0200 |
commit | 636c1dbe92217810127fb4ef5d56a88399a23bbb (patch) | |
tree | 30ecd2b4c53e2e9f37257f3dc3c5c898efa41fb6 | |
parent | d1b7465073cd8d60ec6611f541609215d54b4aa3 (diff) | |
download | rules-cc-636c1dbe92217810127fb4ef5d56a88399a23bbb.tar.gz |
shell-test runner: explicitly set HOME
... to a value that is a non-existent directory. Too many tools try
search for rc-files in the user's home directory. To make things
worth, the shell as well as many tools take an unset HOME variable
as instruction to look up the the user's home directory in the system
configuration. While it is good practise to write tests in such
a way that they explcitly do not depend on such machine-specific
defaults, still be on the safe side by explictly setting HOME to a
directory in the action directory we know our rules will no create.
Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
Co-authored-by: Sascha Roloff <sascha.roloff@huawei.com>
-rwxr-xr-x | shell/test/runner | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/test/runner b/shell/test/runner index 624610b..81669fb 100755 --- a/shell/test/runner +++ b/shell/test/runner @@ -22,6 +22,7 @@ echo "${RESULT}" > result echo UNKNOWN > time-start echo UNKNOWN > time-stop pwd > pwd +export HOME="$(pwd)/DO-NO-USE-HOME" mkdir scratch export TEST_TMPDIR=$(realpath scratch) |