[Xfce4-commits] [apps/xfce4-notifyd] 01/01: Add another test file
noreply at xfce.org
noreply at xfce.org
Fri Feb 16 23:35:13 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-notifyd.
commit c38c3f708889e9cf2ace6091102ef2ad647e4de2
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Fri Feb 16 23:34:30 2018 +0100
Add another test file
This helped bisect and test the various segfaults that were introduced
after 0.3.6
---
tests/dummy-notification.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/tests/dummy-notification.sh b/tests/dummy-notification.sh
new file mode 100755
index 0000000..7db2cff
--- /dev/null
+++ b/tests/dummy-notification.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+
+echo "Setting coredump location to /tmp"
+echo '/tmp/core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern
+ulimit -c unlimited
+
+# run gdb to read the coredump, e.g.
+# gdb ../xfce4-notifyd/xfce4-notifyd /tmp/core_xfce4-notifyd.20126
+
+die () {
+echo $1
+exit $2
+}
+
+# create a fresh build to be sure
+./autogen.sh || die "Autogen failed" 4
+make || die "make failed" 5
+
+pushd tests
+
+for i in {1..10}; do
+
+ # make sure to kill notifyd in case it's already running in a different version
+ # than what we currently want to test
+ killall -q xfce4-notifyd;
+ # reset the known applications property, to see if values get inserted correctly
+ xfconf-query -c xfce4-notifyd -p /applications/known_applications -r;
+
+ ../xfce4-notifyd/xfce4-notifyd &
+ PID=$!
+
+ # check if notifyd just died on startup
+ sleep 1;
+ ps -p $PID >/dev/null 2>&1 || die "DIED up front" 1
+
+ # send a notification with some markup
+ notify-send "Test nr $i" "This the <a href='https://lmgtfy.com'>dummy notification</a> nr. $i"
+ sleep 1;
+
+ # send audio notifications to test icon-only mode
+ xdotool key XF86AudioRaiseVolume
+ sleep 1;
+ xdotool key XF86AudioLowerVolume
+
+ sleep 1;
+
+ # check if the known applications were recorded
+ ps -p $PID >/dev/null 2>&1 || die "DIED after send" 2
+ if [ $(xfconf-query -c xfce4-notifyd -p /applications/known_applications | wc -l) -eq 0 ]; then
+ die "no known application" 3
+ fi
+
+ killall -q xfce4-notifyd;
+done;
+popd
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list