summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2016-02-22 17:40:12 +0100
committerMarian Csontos <mcsontos@redhat.com>2016-02-22 17:50:35 +0100
commit367fb85e44e0718a335c328ca75cb646539d3148 (patch)
tree801f9f478d16b5629c000e6c6bcf87ca9f6ae4c3 /test/api
parentc716813651c2691c44bc709040cd16fbf363a74e (diff)
downloadlvm2-367fb85e44e0718a335c328ca75cb646539d3148.tar.gz
spec: Fix 04ab1fa572bb: Remove left-overs
Diffstat (limited to 'test/api')
-rw-r--r--test/api/pytest.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/api/pytest.sh b/test/api/pytest.sh
index 33c109533..28a1cd02c 100644
--- a/test/api/pytest.sh
+++ b/test/api/pytest.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright (C) 2012-2015 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
@@ -31,9 +31,17 @@ aux prepare_dmeventd
#Locate the python binding library to use.
if [[ -n $abs_top_builddir ]]; then
- python_lib=$(find $abs_top_builddir -name lvm.so)
- # Unable to test python bindings if library not available
- test -n "$python_lib" || skip "lvm2-python-libs not built"
+ python_lib=($(find $abs_top_builddir -name lvm.so))
+ if [[ ${#python_lib[*]} -ne 1 ]]; then
+ if [[ ${#python_lib[*]} -gt 1 ]]; then
+ # Unable to test python bindings if multiple libraries found:
+ echo "Found left over lvm.so: ${python_lib[*]}"
+ false
+ else
+ # Unable to test python bindings if library not available
+ skip "lvm2-python-libs not built"
+ fi
+ fi
export PYTHONPATH=$(dirname $python_lib):$PYTHONPATH
elif rpm -q lvm2-python-libs &>/dev/null; then