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.
This commit is contained in:
Peter Barker 2017-04-26 14:12:10 +10:00
parent 44d84fca15
commit e90c62ffc6
1 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,10 @@ name="$1"
shift shift
echo "RiTW: Starting $name : $*" echo "RiTW: Starting $name : $*"
if [ ! -v SITL_RITW_MINIMIZE ]; then
SITL_RITW_MINIMIZE=1
fi
if [ -n "$SITL_RITW_TERMINAL" ]; then if [ -n "$SITL_RITW_TERMINAL" ]; then
# create a small shell script containing the command to run; this # create a small shell script containing the command to run; this
# avoids problems where "screen" expects arguments in # 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 elif [ -n "$DISPLAY" -a -n "$(which osascript)" ]; then
osascript -e 'tell application "Terminal" to do script "'"$* "'"' osascript -e 'tell application "Terminal" to do script "'"$* "'"'
elif [ -n "$DISPLAY" -a -n "$(which xterm)" ]; then 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 elif [ -n "$DISPLAY" -a -n "$(which konsole)" ]; then
konsole --hold -e $* konsole --hold -e $*
elif [ -n "$DISPLAY" -a -n "$(which gnome-terminal)" ]; then elif [ -n "$DISPLAY" -a -n "$(which gnome-terminal)" ]; then