mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: vdo emulation without vdo binary
Avoid inserting 'vdo' binary into path - and use alias and VDO_BINARY shell vars for emulation.
This commit is contained in:
parent
acbeaa7a8d
commit
15ad2b8e55
@ -344,7 +344,7 @@ vdo_dry_ vdo_remove_ -f "$vdo_confFile" -n "$vdo_name" || true
|
||||
#
|
||||
# MAIN
|
||||
#
|
||||
case "$1" in
|
||||
case "${1-}" in
|
||||
"create") shift; vdo_create_ "$@" ;;
|
||||
"remove") shift; vdo_remove_ "$@" ;;
|
||||
"stop") shift; vdo_stop_ "$@" ;;
|
||||
|
@ -29,7 +29,16 @@ aux prepare_dmeventd
|
||||
#
|
||||
# Main
|
||||
#
|
||||
which vdo || skip
|
||||
if not which vdo ; then
|
||||
which lvm_vdo_wrapper || skip "Missing 'lvm_vdo_wrapper'."
|
||||
which oldvdoformat || skip "Emulation of vdo manager 'oldvdoformat' missing."
|
||||
which oldvdoprepareforlvm || skip "Emulation of vdo manager 'oldvdoprepareforlvm' missing."
|
||||
# enable expansion of aliasis within script itself
|
||||
shopt -s expand_aliases
|
||||
alias vdo='lvm_vdo_wrapper'
|
||||
export VDO_BINARY=lvm_vdo_wrapper
|
||||
echo "Using 'lvm_vdo_wrapper' emulation of 'vdo' manager."
|
||||
fi
|
||||
which mkfs.ext4 || skip
|
||||
export MKE2FS_CONFIG="$TESTDIR/lib/mke2fs.conf"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user