mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
makefiles: ensure test dir can run unit-test
This commit is contained in:
parent
a1e5b8832b
commit
250e05a965
@ -169,7 +169,7 @@ endif
|
|||||||
|
|
||||||
run-unit-test unit-test:
|
run-unit-test unit-test:
|
||||||
@echo " [MAKE] $<"
|
@echo " [MAKE] $<"
|
||||||
$(Q) $(MAKE) -C unit $(@)
|
$(Q) $(MAKE) -C $(top_builddir) $(@)
|
||||||
|
|
||||||
DATADIR = $(datadir)/lvm2-testsuite
|
DATADIR = $(datadir)/lvm2-testsuite
|
||||||
EXECDIR = $(libexecdir)/lvm2-testsuite
|
EXECDIR = $(libexecdir)/lvm2-testsuite
|
||||||
@ -314,7 +314,7 @@ lib/dm-version-expected: $(top_srcdir)/VERSION_DM .lib-dir-stamp
|
|||||||
CMDS = lvm $(shell cat $(top_builddir)/tools/.commands 2>/dev/null)
|
CMDS = lvm $(shell cat $(top_builddir)/tools/.commands 2>/dev/null)
|
||||||
LIB = $(addprefix lib/, $(LIB_SECURETEST) $(LIB_DMSECURETEST) $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(LIB_FLAVOURS))
|
LIB = $(addprefix lib/, $(LIB_SECURETEST) $(LIB_DMSECURETEST) $(LIB_SHARED) $(LIB_LOCAL) $(LIB_NOT) $(LIB_LINK_NOT) $(LIB_FLAVOURS))
|
||||||
|
|
||||||
.tests-stamp: $(ALL) $(LIB) $(SUBDIRS) lib/version-expected lib/dm-version-expected
|
.tests-stamp: $(ALL) $(LIB) $(SUBDIRS) lib/version-expected lib/dm-version-expected unit-test
|
||||||
@echo " [TEST-STAMP]"
|
@echo " [TEST-STAMP]"
|
||||||
@if test "$(srcdir)" != . ; then \
|
@if test "$(srcdir)" != . ; then \
|
||||||
echo "Linking tests to builddir."; \
|
echo "Linking tests to builddir."; \
|
||||||
|
@ -41,9 +41,10 @@ CLEAN_TARGETS += $(UNIT_DEPENDS) $(UNIT_OBJECTS) \
|
|||||||
test/unit/unit-test: $(UNIT_OBJECTS) lib/liblvm-internal.a libdaemon/client/libdaemonclient.a $(INTERNAL_LIBS)
|
test/unit/unit-test: $(UNIT_OBJECTS) lib/liblvm-internal.a libdaemon/client/libdaemonclient.a $(INTERNAL_LIBS)
|
||||||
@echo " [LD] $@"
|
@echo " [LD] $@"
|
||||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) \
|
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) \
|
||||||
-o $@ $+ $(LIBS) $(DMEVENT_LIBS) $(SYSTEMD_LIBS) -lm -ldl -laio
|
-o $@ $+ $(DMEVENT_LIBS) $(SYSTEMD_LIBS) $(LIBS) -ldl -laio
|
||||||
|
|
||||||
.PHONEY: run-unit-test
|
.PHONEY: run-unit-test unit-test
|
||||||
|
unit-test: test/unit/unit-test
|
||||||
run-unit-test: test/unit/unit-test
|
run-unit-test: test/unit/unit-test
|
||||||
@echo Running unit tests
|
@echo Running unit tests
|
||||||
LD_LIBRARY_PATH=libdm test/unit/unit-test run
|
LD_LIBRARY_PATH=libdm test/unit/unit-test run
|
||||||
|
Loading…
Reference in New Issue
Block a user