From e90c62ffc64d90efaccc36b367436cc2972bd0b8 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 26 Apr 2017 14:12:10 +1000 Subject: [PATCH] autotest: run_in_terminal_window gets SITL_RITW_MINIMIZE This is handy when running gdb repeatedly; don't need to find the iconified window all the time. --- Tools/autotest/run_in_terminal_window.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/run_in_terminal_window.sh b/Tools/autotest/run_in_terminal_window.sh index 25816ed6f1..7405f46356 100755 --- a/Tools/autotest/run_in_terminal_window.sh +++ b/Tools/autotest/run_in_terminal_window.sh @@ -7,6 +7,10 @@ name="$1" shift echo "RiTW: Starting $name : $*" +if [ ! -v SITL_RITW_MINIMIZE ]; then + SITL_RITW_MINIMIZE=1 +fi + if [ -n "$SITL_RITW_TERMINAL" ]; then # create a small shell script containing the command to run; this # avoids problems where "screen" expects arguments in @@ -27,7 +31,10 @@ if [ -n "$SITL_RITW_TERMINAL" ]; then elif [ -n "$DISPLAY" -a -n "$(which osascript)" ]; then osascript -e 'tell application "Terminal" to do script "'"$* "'"' elif [ -n "$DISPLAY" -a -n "$(which xterm)" ]; then - xterm -iconic -xrm 'XTerm*selectToClipboard: true' -xrm 'XTerm*initialFont: 6' -n "$name" -name "$name" -T "$name" -hold -e $* & + if [ $SITL_RITW_MINIMIZE -eq 1 ]; then + ICONIC=-iconic + fi + xterm $ICONIC -xrm 'XTerm*selectToClipboard: true' -xrm 'XTerm*initialFont: 6' -n "$name" -name "$name" -T "$name" -hold -e $* & elif [ -n "$DISPLAY" -a -n "$(which konsole)" ]; then konsole --hold -e $* elif [ -n "$DISPLAY" -a -n "$(which gnome-terminal)" ]; then