]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/pyzfs/pyzfs_unittest.ksh
ZTS: Adopt OpenZFS test analysis script
[mirror_zfs.git] / tests / zfs-tests / tests / functional / pyzfs / pyzfs_unittest.ksh
index 07f7aee4ad7e7b4de7f24dd6efa2e9502dac0288..fb4b603617a383959f2020b97a6626de8bf457df 100755 (executable)
 
 verify_runnable "global"
 
+# Verify that the required dependencies for testing are installed.
+python -c "import cffi" 2>/dev/null
+if [ $? -eq 1 ]; then
+       log_unsupported "python-cffi not found by Python"
+fi
+
 # We don't just try to "import libzfs_core" because we want to skip these tests
 # only if pyzfs was not installed due to missing, build-time, dependencies; if
 # we cannot load "libzfs_core" due to other reasons, for instance an API/ABI
@@ -34,8 +40,7 @@ verify_runnable "global"
 python -c '
 import pkgutil, sys
 sys.exit(pkgutil.find_loader("libzfs_core") is None)'
-if [ $? -eq 1 ]
-then
+if [ $? -eq 1 ]; then
        log_unsupported "libzfs_core not found by Python"
 fi