diff options
author | Marian Csontos <mcsontos@redhat.com> | 2016-02-22 17:40:12 +0100 |
---|---|---|
committer | Marian Csontos <mcsontos@redhat.com> | 2016-02-22 17:50:35 +0100 |
commit | 367fb85e44e0718a335c328ca75cb646539d3148 (patch) | |
tree | 801f9f478d16b5629c000e6c6bcf87ca9f6ae4c3 | |
parent | c716813651c2691c44bc709040cd16fbf363a74e (diff) | |
download | lvm2-367fb85e44e0718a335c328ca75cb646539d3148.tar.gz |
spec: Fix 04ab1fa572bb: Remove left-overs
-rw-r--r-- | spec/build.inc | 5 | ||||
-rw-r--r-- | test/api/pytest.sh | 16 |
2 files changed, 12 insertions, 9 deletions
diff --git a/spec/build.inc b/spec/build.inc index 3ba7840ca..cd58f3b1a 100644 --- a/spec/build.inc +++ b/spec/build.inc @@ -55,11 +55,6 @@ make install_initscripts DESTDIR=$RPM_BUILD_ROOT %if %{enable_testsuite} make -C test install DESTDIR=$RPM_BUILD_ROOT %endif -%if %{enable_python3} -pushd %{py3dir} -make -C python install DESTDIR=$RPM_BUILD_ROOT -popd -%endif # when building an src.rpm from freestanding specfiles test -e %{_sourcedir}/source.inc || cp source.inc build.inc packages.inc macros.inc %{_sourcedir} 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 |