master - python unit test: Limit PVs to use
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9b28255aac9386db6d51cd1b501a9f39e81778a5 Commit: 9b28255aac9386db6d51cd1b501a9f39e81778a5 Parent: df6f0f71b10748fb809fa4d04de7541773a83ac3 Author: Tony Asleson <[email protected]> AuthorDate: Fri Jul 26 09:51:58 2013 -0500 Committer: Tony Asleson <[email protected]> CommitterDate: Fri Jul 26 16:43:49 2013 -0500
python unit test: Limit PVs to use
When running in the context of the test framework
we need to limit our PVs to use to those created
in the framework.
Signed-off-by Tony Asleson <[email protected]>
--- test/api/pytest.sh | 13 +- test/api/python_lvm_unit.py | 471 ++++++++++++++++++++++++++++--------------- 2 files changed, 315 insertions(+), 169 deletions(-)
test/api/pytest.sh +7 -6
@@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2012 Red Hat, Inc. All rights reserved. +# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -24,10 +24,11 @@ test -z "$python_lib" && skip export PYTHONPATH=`dirname $python_lib`:$PYTHONPATH +#Setup which devices the unit test can use. +export PY_UNIT_PVS=$(cat DEVICES) + + +#We will skip until we can ensure it is correct. skip -# skiped until fixed -# FIXME - script must ONLY use $(cat DEVICES) as PVs -# it must NOT create/modify/remove volumes from other places -python_lvm_unit.py -v -# nemiver python ../api/python_lvm_unit.py -v -f +python_lvm_unit.py -v -f
test/api/python_lvm_unit.py +308 -163
712 lines not on this page · raw message