master - python-lvm: Initial check-in of python-lvm unit test case.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7a34db0cfdeab53e56182c7499214016a93706b2 Commit: 7a34db0cfdeab53e56182c7499214016a93706b2 Parent: fefb2f03c3fe49e855f21f7d4952b6a2318113cc Author: Tony Asleson <[email protected]> AuthorDate: Fri Oct 26 15:35:17 2012 -0500 Committer: Tony Asleson <[email protected]> CommitterDate: Wed Nov 14 13:18:37 2012 -0600
python-lvm: Initial check-in of python-lvm unit test case.
Signed-off-by Tony Asleson <[email protected]>
--- WHATS_NEW | 1 + test/api/pytest.sh | 27 +++ test/api/python_lvm_unit.py | 375 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 403 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Add python-lvm unit test case Exit pvscan --cache immediately if cluster locking used or lvmetad not used. Don't use lvmetad in lvm2-monitor.service ExecStop to avoid a systemd issue. Remove dependency on fedora-storage-init.service in lvm2 systemd units.
test/api/pytest.sh new file +27 -0
@@ -0,0 +1,27 @@ +#!/bin/sh +# Copyright (C) 2012 Red Hat, Inc. All rights reserved. +# +# This file is part of LVM2. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +. lib/test + +aux prepare_vg 1 +lvcreate -n test -l 5 $vg + +#Locate the python binding library to use. +python_lib=`find $abs_top_builddir -name lvm.so` +if [ "$python_lib" != "" ] +then + export PYTHONPATH=`dirname $python_lib`:$PYTHONPATH + python_lvm_unit.py +else + echo "Unable to test python bindings as library not available" +fi
test/api/python_lvm_unit.py new file +375 -0
376 lines not on this page · raw message