Skip to content

Commit

Permalink
Merge pull request #603 from tsipinakis/test-install
Browse files Browse the repository at this point in the history
Test installation
  • Loading branch information
tsipinakis authored Feb 6, 2019
2 parents 2568727 + 2fb1de8 commit 9e8142a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 24 additions & 0 deletions test/test-install.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9e8142a

Please sign in to comment.