summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-06-05 15:07:07 +0200
committerMichael Adam <obnox@samba.org>2014-06-06 02:25:52 +0200
commit7091755c5834f74170b26a6f1e59c98a9051260d (patch)
tree7339b34d53a4957eb27cd33051c7e69182d121b3
parentfae59b494bd223fe11ba91a2ca62fc0f4fc396ff (diff)
downloadsamba-7091755c5834f74170b26a6f1e59c98a9051260d.tar.gz
samba-7091755c5834f74170b26a6f1e59c98a9051260d.tar.xz
samba-7091755c5834f74170b26a6f1e59c98a9051260d.zip
selftest: Add support for tmate.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jun 6 02:25:52 CEST 2014 on sn-devel-104
-rwxr-xr-xselftest/in_screen8
1 files changed, 7 insertions, 1 deletions
diff --git a/selftest/in_screen b/selftest/in_screen
index 5468a216e31..36c3da11918 100755
--- a/selftest/in_screen
+++ b/selftest/in_screen
@@ -69,8 +69,14 @@ cleanup() {
rm -f $basedir/$SERVERNAME.status $basedir/$SERVERNAME.log
echo $$ > $basedir/$SERVERNAME.parent.pid
trap cleanup SIGINT SIGTERM SIGPIPE
+
if [[ "$TMUX" ]]; then
- tmux new-window -n test:$SERVERNAME "bash $basedir/$SERVERNAME.launch"
+ TMUX_CMD=tmux
+ if [[ $TMUX = *tmate* ]]; then
+ TMUX_CMD=tmate
+ fi
+
+ $TMUX_CMD new-window -n test:$SERVERNAME "bash $basedir/$SERVERNAME.launch"
else
screen -r -X screen -t test:$SERVERNAME bash $basedir/$SERVERNAME.launch
fi