#!/bin/sh
set -e
cd tests

# disable notify-send AppArmor profile on Ubuntu
if command -v apparmor_parser && [ -e /etc/apparmor.d/notify-send ]; then
    ln -s /etc/apparmor.d/notify-send /etc/apparmor.d/disable/
    apparmor_parser -R /etc/apparmor.d/notify-send
fi

# run the tests as user
su -s /bin/bash - -c "cd $PWD; python3 -m unittest -v" daemon
