mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +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:
|
||||
@echo " [MAKE] $<"
|
||||
$(Q) $(MAKE) -C unit $(@)
|
||||
$(Q) $(MAKE) -C $(top_builddir) $(@)
|
||||
|
||||
DATADIR = $(datadir)/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)
|
||||
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]"
|
||||
@if test "$(srcdir)" != . ; then \
|
||||
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)
|
||||
@echo " [LD] $@"
|
||||
$(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
|
||||
@echo Running unit tests
|
||||
LD_LIBRARY_PATH=libdm test/unit/unit-test run
|
||||
|
Loading…
x
Reference in New Issue
Block a user