mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: ensure there is dbus config file
Copy lvmdbusd.profile to lib as installed place. Use TESTOLDPWD and avoid add new 'same' variable test_data_dir.
This commit is contained in:
parent
4a59cfaa1d
commit
b0bda09005
@ -233,7 +233,7 @@ install: .tests-stamp lib/paths-installed
|
||||
dm-version-expected \
|
||||
version-expected \
|
||||
$(DATADIR)/lib
|
||||
@for i in cache-mq cache-smq thin-performance ; do \
|
||||
@for i in cache-mq cache-smq thin-performance lvmdbusd ; do \
|
||||
echo "$(INSTALL_DATA) $(abs_top_srcdir)/conf/$$i.profile $(DATADIR)/lib"; \
|
||||
$(INSTALL_DATA) $(abs_top_srcdir)/conf/$$i.profile $(DATADIR)/lib; done
|
||||
cd lib && $(INSTALL_SCRIPT) $(LIB_SHARED) $(DATADIR)/lib
|
||||
@ -295,14 +295,12 @@ lib/paths-installed: lib/paths-common
|
||||
$(RM) $@-t
|
||||
cat lib/paths-common > $@-t
|
||||
echo 'installed_testsuite=1' >> $@-t
|
||||
echo 'test_data_dir="@datadir@/lvm2-testsuite"' >> $@-t
|
||||
echo 'export PATH=@libexecdir@/lvm2-testsuite:@datadir@/lvm2-testsuite/lib:@datadir@/lvm2-testsuite/api:$$PATH' >> $@-t
|
||||
mv $@-t $@
|
||||
|
||||
lib/paths: lib/paths-common
|
||||
$(RM) $@-t
|
||||
cat lib/paths-common > $@-t
|
||||
echo 'test_data_dir="$(abs_top_builddir)/test"' >> $@-t
|
||||
echo 'top_srcdir="$(top_srcdir)"' >> $@-t
|
||||
echo 'abs_top_builddir="$(abs_top_builddir)"' >> $@-t
|
||||
echo 'abs_top_srcdir="$(abs_top_srcdir)"' >> $@-t
|
||||
@ -338,6 +336,7 @@ LIB = $(addprefix lib/, $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(
|
||||
daemons/lvmpolld/lvmpolld ; do \
|
||||
$(LN_S) -f $(abs_top_builddir)/$$i lib/; done
|
||||
$(LN_S) -f $(abs_top_builddir)/tools/dmsetup lib/dmstats
|
||||
$(LN_S) -f $(abs_top_srcdir)/conf/lvmdbusd.profile lib/
|
||||
$(LN_S) -f $(abs_top_srcdir)/conf/thin-performance.profile lib/
|
||||
$(LN_S) -f $(abs_top_srcdir)/scripts/fsadm.sh lib/fsadm
|
||||
test "$(srcdir)" = . || for i in $(LIB_LVMLOCKD_CONF); do \
|
||||
@ -351,7 +350,7 @@ endif
|
||||
|
||||
CLEAN_TARGETS += .lib-dir-stamp .tests-stamp $(LIB) $(addprefix lib/,\
|
||||
$(CMDS) clvmd dmeventd dmsetup dmstats lvmetad lvmpolld \
|
||||
harness thin-performance.profile fsadm \
|
||||
harness lvmdbusd.profile thin-performance.profile fsadm \
|
||||
dm-version-expected version-expected \
|
||||
paths-installed paths-installed-t paths-common paths-common-t)
|
||||
|
||||
|
@ -20,13 +20,17 @@ aux prepare_pvs 6
|
||||
|
||||
# We need the lvmdbusd.profile for the daemon to utilize JSON
|
||||
# output
|
||||
mkdir -p $TESTDIR/etc/profile/
|
||||
cp -v $TESTOLDPWD/../conf/lvmdbusd.profile $TESTDIR/etc/profile/.
|
||||
mkdir -p "$TESTDIR/etc/profile"
|
||||
cp -v "$TESTOLDPWD/lib/lvmdbusd.profile" "$TESTDIR/etc/profile/"
|
||||
|
||||
# Need to set this up so that the lvmdbusd service knows which
|
||||
# binary to be running, which should be the one we just built
|
||||
export LVM_BINARY=$TESTOLDPWD/../tools/lvm
|
||||
export LVM_BINARY=$(which lvm 2>/dev/null)
|
||||
# skip if we don't have our own lvmetad...
|
||||
if test -z "${installed_testsuite+varset}"; then
|
||||
(echo "$LVM_BINARY" | grep -q "$abs_builddir") || skip
|
||||
fi
|
||||
|
||||
aux prepare_lvmdbusd
|
||||
|
||||
$test_data_dir/dbus/lvmdbustest.py -v
|
||||
$TESTOLDPWD/dbus/lvmdbustest.py -v
|
||||
|
@ -39,7 +39,7 @@ which mkfs.ext4 || skip
|
||||
|
||||
# Use our mkfs config file to get approximately same results
|
||||
# TODO: maybe use it for all test via some 'prepare' function
|
||||
export MKE2FS_CONFIG="$TESTDIR/lib/mke2fs.conf"
|
||||
export MKE2FS_CONFIG="$TESTOLDPWD/lib/mke2fs.conf"
|
||||
|
||||
aux prepare_dmeventd
|
||||
aux prepare_pvs 2 64
|
||||
|
Loading…
Reference in New Issue
Block a user