Limit the sunrise time to a minimum
[wakeup.git] / test / sunset_summer
diff --git a/test/sunset_summer b/test/sunset_summer
new file mode 100755 (executable)
index 0000000..3c29f71
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+#
+#  Test the wakeup sequence in winter.
+#
+set -m
+PATH=../src:$PATH
+
+# Reset the lights and clear the log files
+
+lightcontrol -r 0 -g 0 -b 0 -w 0
+> lightcontrol.log
+> wakeup.log
+
+ln -f -s wakeup_empty.xml wakeup_link.xml
+
+wakeup &
+sleep 1
+
+read TACHYON_NAME <wakeup.run
+Time=`date --date '2020-06-18 15:00' +%s`
+tachyon -t $Time $TACHYON_NAME
+tachyon -a 1000   $TACHYON_NAME
+
+ln -f -s sunset_alarms.xml wakeup_link.xml
+
+kill -HUP `cat wakeup.pid`
+
+fg %1
+#kill  `cat wakeup.pid`
+
+# Remove timestamps from the log.
+cut -c 22- wakeup.log >sunset_summer.log.test
+
+diff sunset_summer.log.test sunset_summer.log.expect
+
+
+exit $?