From 1cc83223afca5e7d6e29d403e3d6e4e918c5c9b9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 5 Aug 2023 13:11:52 +1000 Subject: [PATCH] autotest: fixed using GNU screen for opening gdb screen doesn't start the process in the current working directory --- Tools/autotest/pysim/util.py | 2 +- Tools/autotest/run_in_terminal_window.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/pysim/util.py b/Tools/autotest/pysim/util.py index ec6b101aaa..d17b6df4ab 100644 --- a/Tools/autotest/pysim/util.py +++ b/Tools/autotest/pysim/util.py @@ -506,7 +506,7 @@ def start_SITL(binary, '-d', '-m', '-S', 'ardupilot-gdb', - 'gdb', '-x', '/tmp/x.gdb', binary, '--args']) + 'gdb', '--cd', os.getcwd(), '-x', '/tmp/x.gdb', binary, '--args']) elif lldb: f = open("/tmp/x.lldb", "w") for breakingpoint in breakpoints: diff --git a/Tools/autotest/run_in_terminal_window.sh b/Tools/autotest/run_in_terminal_window.sh index 86bd86a2d1..7a83f1c565 100755 --- a/Tools/autotest/run_in_terminal_window.sh +++ b/Tools/autotest/run_in_terminal_window.sh @@ -43,7 +43,7 @@ elif [ -n "$DISPLAY" -a -n "$(which gnome-terminal)" ]; then gnome-terminal -e "$*" elif [ -n "$STY" ]; then # We are running inside of screen, try to start it there - screen -X screen -t "$name" $* + screen -X screen -t "$name" bash -c "cd $PWD; $*" else filename="/tmp/$name.log" echo "RiTW: Window access not found, logging to $filename"