diff options
author | Nick Terrell <terrelln@fb.com> | 2018-05-04 20:35:10 (GMT) |
---|---|---|
committer | Nick Terrell <terrelln@fb.com> | 2018-05-04 20:50:23 (GMT) |
commit | a7cc0b590a634e3c2612976c1dc83e74f8448d43 (patch) | |
tree | 38c40dc788d0207e249a61069b30948d156b3c1c /tests/test_install.sh | |
parent | d358e33faa87e0293f27f272a8579de73f4ba938 (diff) | |
download | lz4-a7cc0b590a634e3c2612976c1dc83e74f8448d43.zip lz4-a7cc0b590a634e3c2612976c1dc83e74f8448d43.tar.gz lz4-a7cc0b590a634e3c2612976c1dc83e74f8448d43.tar.bz2 |
Fix make install
* Uninstall didn't remove the pkg-config correctly.
* Fix `mandir`
* Allow overriding either upper- or lower-case location variables, but
always use the lower case variables.
* Add test case that ensures overriding both upper- and lower-case
variables is the same, and that the directory is empty after uninstall.
Diffstat (limited to 'tests/test_install.sh')
-rwxr-xr-x | tests/test_install.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_install.sh b/tests/test_install.sh new file mode 100755 index 0000000..2e1a5a5 --- /dev/null +++ b/tests/test_install.sh @@ -0,0 +1,21 @@ +#/usr/bin/env sh +set -e + +make="make -C $lz4_root" +$make CFLAGS=-O0 > /dev/null +for cmd in install uninstall; do + for upper in DUMMY PREFIX EXEC_PREFIX LIBDIR INCLUDEDIR PKGCONFIGDIR BINDIR MANDIR MAN1DIR ; do + lower=$(echo $upper | tr '[:upper:]' '[:lower:]') + tmp_lower="$(pwd)/tmp-lower-$lower/" + tmp_upper="$(pwd)/tmp-upper-$lower/" + echo $make $cmd DESTDIR="$tmp_upper" $upper="test" + $make $cmd DESTDIR="$tmp_upper" $upper="test" >/dev/null + echo $make $cmd DESTDIR="$tmp_lower" $lower="test" + $make $cmd DESTDIR="$tmp_lower" $lower="test" >/dev/null + command diff -r "$tmp_lower" "$tmp_upper" && echo "SAME!" || false + if [ "x$cmd" = "xuninstall" ]; then + test -z "$(find "$tmp_lower" -type f)" && echo "EMPTY!" || false + rm -rf "$tmp_upper" "$tmp_lower" + fi + done +done |