Группа :: Графические оболочки/XFce
Пакет: libxfconf
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: xfconf-4.18.1-alt1.patch
Скачать
Скачать
tests/test-template.sh.in | 49 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/tests/test-template.sh.in b/tests/test-template.sh.in
new file mode 100644
index 0000000..2e638a8
--- /dev/null
+++ b/tests/test-template.sh.in
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+cleanup() {
+ if [ "$XFCONFD_PID" ]; then
+ kill -TERM $XFCONFD_PID 2>/dev/null
+ sleep 1
+ kill -KILL $XFCONFD_PID 2>/dev/null
+ fi
+
+ kill -TERM $DBUS_SESSION_BUS_PID 2>/dev/null
+ sleep 1
+ kill -KILL $DBUS_SESSION_BUS_PID 2>/dev/null
+}
+
+die() {
+ [ "$1" ] && echo "$1" >&2
+ cleanup
+ exit 1
+}
+
+# some buildbots have problems with the tests (dbus not
+# working properly without an X11 server).
+if [ -n "$XFCONF_SKIP_TESTS" ]; then
+ echo "Warning: Tests disabled, skipping @TEST_NAME@" >&2
+ exit 0
+fi
+
+unset DBUS_SESSION_BUS_ADDRESS
+unset DBUS_SESSION_BUS_PID
+unset XFCONFD_PID
+
+eval `dbus-launch --sh-syntax`
+export DBUS_SESSION_BUS_ADDRESS
+export DBUS_SESSION_BUS_PID
+
+[ "$DBUS_SESSION_BUS_PID" ] || die "DBus failed to start"
+
+trap "die Interrupted" INT
+
+eval `$XFCONFD --daemon 2>/dev/null` || die "Failed to start xfconfd"
+
+export XDG_CONFIG_HOME # make sure it's exported from the makefile
+export XDG_CONFIG_DIRS=""
+
+./@TEST_NAME@ || die "Test Failed"
+
+cleanup
+
+exit 0