Merge pull request #603 from tsipinakis/test-install

Test installation
This commit is contained in:
Nikos Tsipinakis 2019-02-06 18:14:46 +02:00 committed by GitHub
commit 9e8142af44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 0 deletions

View File

@ -24,6 +24,7 @@ jobs:
- checkout
- run: make CC=clang -j all dunstify test/test
- run: make CC=clang -j test-valgrind
- run: ./test/test-install.sh
- run: make clean
- run: make CC=gcc -j all dunstify test/test
- run: make CC=gcc -j test-valgrind

View File

@ -26,6 +26,7 @@ before_install:
script:
- CFLAGS="-Werror" make all dunstify test-valgrind doc-doxygen
- ./test/test-install.sh
- CFLAGS="-Werror" make clean
- CFLAGS="-Werror" make test-coverage

24
test/test-install.sh Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
BASE="$(dirname "$(dirname "$(readlink -f "$0")")")"
PREFIX="${BASE}/install"
make -C "${BASE}" SYSTEMD=1 SERVICEDIR_SYSTEMD="${PREFIX}/systemd" SERVICEDIR_DBUS="${PREFIX}/dbus" PREFIX="${PREFIX}" install
diff -u <(find "${PREFIX}" -type f -printf "%P\n" | sort) - <<EOF
bin/dunst
dbus/org.knopwob.dunst.service
share/dunst/dunstrc
share/man/man1/dunst.1
systemd/dunst.service
EOF
make -C "${BASE}" SYSTEMD=1 SERVICEDIR_SYSTEMD="${PREFIX}/systemd" SERVICEDIR_DBUS="${PREFIX}/dbus" PREFIX="${PREFIX}" uninstall
if ! [ -z "$(find "${PREFIX}" -type f)" ]; then
echo "Uninstall failed, following files weren't removed"
find "${PREFIX}" -type f
exit 1
fi