mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
tests: aux works better with installed_testsuite
When test suite is used from installed rpm package we need to handle things better. This patch is rather first approach - expecting few more tweaks needed.
This commit is contained in:
parent
7a64a157e1
commit
4b161de2e5
@ -31,7 +31,9 @@ prepare_clvmd() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# skip if we don't have our own clvmd...
|
# skip if we don't have our own clvmd...
|
||||||
(which clvmd 2>/dev/null | grep -q "$abs_builddir") || skip
|
if test -z "${installed_testsuite+varset}"; then
|
||||||
|
(which clvmd 2>/dev/null | grep -q "$abs_builddir") || skip
|
||||||
|
fi
|
||||||
# lvs is executed from clvmd - use our version
|
# lvs is executed from clvmd - use our version
|
||||||
export LVM_BINARY=$(which lvm)
|
export LVM_BINARY=$(which lvm)
|
||||||
|
|
||||||
@ -62,8 +64,9 @@ prepare_dmeventd() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# skip if we don't have our own dmeventd...
|
# skip if we don't have our own dmeventd...
|
||||||
(which dmeventd 2>/dev/null | grep "$abs_builddir") || skip
|
if test -z "${installed_testsuite+varset}"; then
|
||||||
|
(which dmeventd 2>/dev/null | grep -q "$abs_builddir") || skip
|
||||||
|
fi
|
||||||
lvmconf "activation/monitoring = 1"
|
lvmconf "activation/monitoring = 1"
|
||||||
|
|
||||||
local run_valgrind=
|
local run_valgrind=
|
||||||
@ -84,8 +87,9 @@ prepare_lvmetad() {
|
|||||||
test $# -eq 0 && default_opts="-l all"
|
test $# -eq 0 && default_opts="-l all"
|
||||||
rm -f debug.log strace.log
|
rm -f debug.log strace.log
|
||||||
# skip if we don't have our own lvmetad...
|
# skip if we don't have our own lvmetad...
|
||||||
(which lvmetad 2>/dev/null | grep "$abs_builddir") || skip
|
if test -z "${installed_testsuite+varset}"; then
|
||||||
|
(which lvmetad 2>/dev/null | grep -q "$abs_builddir") || skip
|
||||||
|
fi
|
||||||
lvmconf "global/use_lvmetad = 1" \
|
lvmconf "global/use_lvmetad = 1" \
|
||||||
"devices/md_component_detection = 0"
|
"devices/md_component_detection = 0"
|
||||||
|
|
||||||
@ -743,28 +747,21 @@ profileconf() {
|
|||||||
profile_name="$1"
|
profile_name="$1"
|
||||||
shift
|
shift
|
||||||
generate_config "$@"
|
generate_config "$@"
|
||||||
test -d etc/profile || mkdir etc/profile
|
mkdir -p etc/profile
|
||||||
mv -f "PROFILE_$profile_name" "etc/profile/$profile_name.profile"
|
mv -f "PROFILE_$profile_name" "etc/profile/$profile_name.profile"
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_profiles() {
|
prepare_profiles() {
|
||||||
test -d etc/profile || mkdir etc/profile
|
mkdir -p etc/profile
|
||||||
for profile_name in $@; do
|
for profile_name in $@; do
|
||||||
test -L "$abs_top_builddir/test/lib/$profile_name.profile" || skip
|
test -L "lib/$profile_name.profile" || skip
|
||||||
cp "$abs_top_builddir/test/lib/$profile_name.profile" "etc/profile/$profile_name.profile"
|
cp "lib/$profile_name.profile" "etc/profile/$profile_name.profile"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
apitest() {
|
apitest() {
|
||||||
local t=$1
|
test -x "api/$1.t" || skip
|
||||||
shift
|
"api/$1.t" "${@:2}" && rm -f debug.log strace.log
|
||||||
test -x "$abs_top_builddir/test/api/$t.t" || skip
|
|
||||||
"$abs_top_builddir/test/api/$t.t" "$@" && rm -f debug.log strace.log
|
|
||||||
}
|
|
||||||
|
|
||||||
api() {
|
|
||||||
test -x "$abs_top_builddir/test/api/wrapper" || skip
|
|
||||||
"$abs_top_builddir/test/api/wrapper" "$@" && rm -f debug.log strace.log
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mirror_recovery_works() {
|
mirror_recovery_works() {
|
||||||
|
Loading…
Reference in New Issue
Block a user