Commit e3f0c525 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

travis: add "make uninstall" test

"make uninstall" is supposed to remove all the files that
"make install" (with the same arguments) have created.
This is a test to check that.

PS ideally, "make uninstall" should also remove any empty directories,
but let's not care about it for now.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 7290de59
...@@ -4,7 +4,7 @@ set -x -e ...@@ -4,7 +4,7 @@ set -x -e
TRAVIS_PKGS="protobuf-c-compiler libprotobuf-c0-dev libaio-dev TRAVIS_PKGS="protobuf-c-compiler libprotobuf-c0-dev libaio-dev
libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev libprotobuf-dev protobuf-compiler python-ipaddr libcap-dev
libnl-3-dev gcc-multilib libc6-dev-i386 gdb bash python-protobuf libnl-3-dev gcc-multilib libc6-dev-i386 gdb bash python-protobuf
libnet-dev util-linux" libnet-dev util-linux asciidoc"
travis_prep () { travis_prep () {
[ -n "$SKIP_TRAVIS_PREP" ] && return [ -n "$SKIP_TRAVIS_PREP" ] && return
...@@ -70,6 +70,7 @@ bash ./test/jenkins/criu-inhfd.sh ...@@ -70,6 +70,7 @@ bash ./test/jenkins/criu-inhfd.sh
make -C test/others/mnt-ext-dev/ run make -C test/others/mnt-ext-dev/ run
#make -C test/others/exec/ run #make -C test/others/exec/ run
make -C test/others/make/ run
./test/zdtm.py run -t zdtm/static/env00 --sibling ./test/zdtm.py run -t zdtm/static/env00 --sibling
......
# Tests for the build system
run:
./uninstall.sh
.PHONY: run
#!/bin/sh
# A test to make sure "make uninstall" works as intended.
set -e
SELFDIR=$(dirname $(readlink -f $0))
DESTDIR=$SELFDIR/test.install-$$
cd $SELFDIR/../../..
set -x
make install DESTDIR=$DESTDIR
make uninstall DESTDIR=$DESTDIR
set +x
# There should be no files left (directories are OK for now)
if [ $(find $DESTDIR -type f | wc -l) -gt 0 ]; then
echo "Files left after uninstall:"
find $DESTDIR -type f
echo "FAIL"
exit 1
fi
echo PASS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment