mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
LVMetaD build hack: link to lvm-internal &c. and add a simple test script.
This commit is contained in:
parent
4fcbeed6ef
commit
9925977b07
@ -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
14
daemons/lvmetad/test.sh
Executable 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" .
|
Loading…
Reference in New Issue
Block a user