1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00

LVMetaD build hack: link to lvm-internal &c. and add a simple test script.

This commit is contained in:
Petr Rockai 2011-06-27 13:44:33 +00:00
parent 0783429215
commit 8d9710bed6
2 changed files with 20 additions and 2 deletions

View File

@ -13,9 +13,10 @@ SHARED_H = ../common/daemon-shared.h
CLIENT_H = ../common/daemon-client.h $(SHARED_H)
SERVER_H = ../common/daemon-server.h $(SHARED_H)
LIBS = -ldevmapper -lpthread
LIBS = -ldevmapper -lpthread -ldevmapper-event -llvm-internal -ldl
IPATH = -I../common -I/srv/build/lvm2/cvs-lvmetad/default/include
LPATH = -L/srv/build/lvm2/cvs-lvmetad/default/libdm
BUILDDIR = /srv/build/lvm2/cvs-lvmetad/default
LPATH = -L$(BUILDDIR)/libdm -L$(BUILDDIR)/lib -L$(BUILDDIR)/daemons/dmeventd
all: testclient lvmetad
@ -24,3 +25,6 @@ testclient: testclient.c $(CLIENT_H) $(CLIENT)
lvmetad: lvmetad-core.c ../common/daemon-server.c ../common/daemon-server.h ../common/daemon-shared.h ../common/daemon-shared.c
gcc -g lvmetad-core.c $(SERVER) $(IPATH) $(LPATH) $(LIBS) -o lvmetad
check: testclient lvmetad
./test.sh "$(BUILDDIR)/libdm:$(BUILDDIR)/daemons/dmeventd"

14
daemons/lvmetad/test.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
export LD_LIBRARY_PATH="$1"
test -n "$2" && {
./lvmetad -f &
PID=$!
sleep .1
./testclient
kill $PID
exit 0
}
sudo ./test.sh "$1" .