aboutsummaryrefslogtreecommitdiff
path: root/robot/robot-test.sh
diff options
context:
space:
mode:
authorPhillip Lord <phillip.lord@russet.org.uk>2019-06-15 22:10:03 +0100
committerPhillip Lord <phillip.lord@russet.org.uk>2019-06-15 22:10:03 +0100
commitbe851b9eb42faa3c096737daaab0afcbc8c5087e (patch)
tree688f1f53b5908ee5523953b3bc2ef5748f4b3524 /robot/robot-test.sh
parent46d71b5218eadb2be2ec5ca32e5fe40f0640bbb9 (diff)
downloadorg-drill-be851b9eb42faa3c096737daaab0afcbc8c5087e.tar.gz
org-drill-be851b9eb42faa3c096737daaab0afcbc8c5087e.zip
Refactor robot testing
Diffstat (limited to 'robot/robot-test.sh')
-rwxr-xr-xrobot/robot-test.sh66
1 files changed, 0 insertions, 66 deletions
diff --git a/robot/robot-test.sh b/robot/robot-test.sh
deleted file mode 100755
index c27b94b..0000000
--- a/robot/robot-test.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-
-set -e
-
-function run_drill {
- ## Org-drill should be running at this point, so give three answers
- ## with a score of file
- sleep 1
- echo answer one
- #xdotool type --window $window_id answer
- xdotool key --window $window_id Return
- sleep 0.25
- xdotool key --window $window_id 5
- sleep 0.25
-
-
- echo answer two
- #xdotool type --window $window_id answer
- xdotool key --window $window_id Return
- sleep 0.25
- xdotool key --window $window_id 5
- sleep 0.25
-
- echo answer three
- #xdotool type --window $window_id answer
- xdotool key --window $window_id Return
- sleep 0.25
- xdotool key --window $window_id 5
- sleep 0.25
-
- ## Press any key to continue
- echo press any key to continue
- xdotool key --window $window_id Return
- sleep 0.25
-
- echo Save file
- xdotool key --window $window_id y
-}
-
-function kill_emacs {
- echo Goodnight Emacs
- xdotool key --window $window_id alt+x
- xdotool type --window $window_id kill-emacs
- xdotool key --window $window_id KP_Enter
-}
-
-$EMACS -Q -l ./robot/org-drill-launch.el &
-
-{
- sleep 2
-
- window_id=`xdotool search --name "emacs-bot"`
- if [ -z "$window_id" ]
- then
- echo "Could not find window ID for Emacs-bot"
- exit 1
- fi
-
- ## Run once with default options
- run_drill
-
- ## Run once with presentation-prompt-with-typing
- run_drill
-
- kill_emacs
-} || cat robot/failure.txt