test_drivers.bash: check for binaries that the driver expects

Skip devicemapper tests if binaries that it expects to find aren't
present.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2018-12-06 11:25:29 -05:00
parent 364b07aba9
commit 97363a8fe3
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@ btrfs() {
}
devicemapper() {
for binary in pvcreate vgcreate lvcreate lvconvert lvchange thin_check ; do
if ! which $binary > /dev/null 2> /dev/null ; then
return 1
fi
done
pkg-config devmapper 2> /dev/null
}