diff options
| author | Phillip Lord <phillip.lord@russet.org.uk> | 2019-06-22 16:37:42 +0100 |
|---|---|---|
| committer | Phillip Lord <phillip.lord@russet.org.uk> | 2019-06-22 16:37:42 +0100 |
| commit | 20c90836aa10045db330699439416197df9fc761 (patch) | |
| tree | cbb6d35e26565e91ce67df5cb34b749eaf4eef37 /robot/robot.sh | |
| parent | 4300ef9d4c70ce47bee196ee49b873fe8603ff66 (diff) | |
| download | org-drill-20c90836aa10045db330699439416197df9fc761.tar.gz org-drill-20c90836aa10045db330699439416197df9fc761.zip | |
Speed up robot tests with polling
Diffstat (limited to 'robot/robot.sh')
| -rw-r--r-- | robot/robot.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/robot/robot.sh b/robot/robot.sh index 8b7e9a3..c5cc33d 100644 --- a/robot/robot.sh +++ b/robot/robot.sh @@ -69,10 +69,16 @@ function wait_emacs { } function find_bot { - window_id=`xdotool search --name "emacs-bot"` - if [ -z "$window_id" ] - then - echo "Could not find window ID for Emacs-bot" - exit 1 - fi + for i in `seq 1 20`; + do + window_id=`xdotool search --name "emacs-bot"` + if [ -z "$window_id" ] + then + sleep 0.1 + else + return + fi + done + echo "Could not find window ID for Emacs-bot" + exit 1 } |
