test-container: preserve history across shell invocations

Message ID 20261022162636.862867-1-clara.kowalsky@siemens.com
State New
Headers show
Series test-container: preserve history across shell invocations | expand

Commit Message

Clara Kowalsky Oct. 22, 2026, 4:26 p.m. UTC
When using `scripts/run-tests.sh --shell`, it is practical if the
shell history is kept.
Set HISTFILE to /work/.isar_test_shell_history, so commands are saved
in the work directory and can be recalled across sessions.
Also add the new file to .gitignore.

Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com>
---
 .gitignore                                     | 1 +
 testsuite/dockerdata/test-container-entrypoint | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/.gitignore b/.gitignore
index fff155f1..b5f6149e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@ 
 __pycache__
 .config.yaml*
 .kas_shell_history
+.isar_test_shell_history
 build*
diff --git a/testsuite/dockerdata/test-container-entrypoint b/testsuite/dockerdata/test-container-entrypoint
index aa3def79..49771c15 100755
--- a/testsuite/dockerdata/test-container-entrypoint
+++ b/testsuite/dockerdata/test-container-entrypoint
@@ -121,7 +121,7 @@  EOF
 cd /isar
 
 if [ "${start_shell}" = 1 ]; then
-	bash
+	HISTFILE=/work/.isar_test_shell_history bash
 else
 	set -x
 	avocado ${showopt} run ${args}