mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
unit-tests: Move to test/unit
This commit is contained in:
parent
cdcea0bf55
commit
ab63923d19
2
.gitignore
vendored
2
.gitignore
vendored
@ -80,4 +80,4 @@ test/lib/vgs
|
|||||||
test/lib/vgscan
|
test/lib/vgscan
|
||||||
test/lib/vgsplit
|
test/lib/vgsplit
|
||||||
|
|
||||||
unit-test/unit-test
|
test/unit/unit-test
|
||||||
|
@ -96,7 +96,7 @@ endif
|
|||||||
DISTCLEAN_TARGETS += cscope.out
|
DISTCLEAN_TARGETS += cscope.out
|
||||||
CLEAN_DIRS += autom4te.cache
|
CLEAN_DIRS += autom4te.cache
|
||||||
|
|
||||||
check check_system check_cluster check_local check_lvmetad check_lvmpolld check_lvmlockd_test check_lvmlockd_dlm check_lvmlockd_sanlock unit-test: all
|
check check_system check_cluster check_local check_lvmetad check_lvmpolld check_lvmlockd_test check_lvmlockd_dlm check_lvmlockd_sanlock: all
|
||||||
$(MAKE) -C test $(@)
|
$(MAKE) -C test $(@)
|
||||||
|
|
||||||
conf.generate man.generate: tools
|
conf.generate man.generate: tools
|
||||||
@ -211,7 +211,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ("$(TESTING)", "yes")
|
ifeq ("$(TESTING)", "yes")
|
||||||
include unit-test/Makefile
|
include test/unit/Makefile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(shell which ctags),)
|
ifneq ($(shell which ctags),)
|
||||||
|
4
configure
vendored
4
configure
vendored
@ -15689,7 +15689,7 @@ _ACEOF
|
|||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmfilemapd/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile unit-test/Makefile tools/Makefile udev/Makefile"
|
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmfilemapd/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile include/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_lvmlocking_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat@.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile"
|
||||||
|
|
||||||
cat >confcache <<\_ACEOF
|
cat >confcache <<\_ACEOF
|
||||||
# This file is a shell script that caches the results of configure
|
# This file is a shell script that caches the results of configure
|
||||||
@ -16462,7 +16462,7 @@ do
|
|||||||
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
|
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
|
||||||
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
|
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
|
||||||
"test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;;
|
"test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;;
|
||||||
"unit-test/Makefile") CONFIG_FILES="$CONFIG_FILES unit-test/Makefile" ;;
|
"test/unit/Makefile") CONFIG_FILES="$CONFIG_FILES test/unit/Makefile" ;;
|
||||||
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
|
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
|
||||||
"udev/Makefile") CONFIG_FILES="$CONFIG_FILES udev/Makefile" ;;
|
"udev/Makefile") CONFIG_FILES="$CONFIG_FILES udev/Makefile" ;;
|
||||||
|
|
||||||
|
@ -2245,7 +2245,7 @@ scripts/lvmdump.sh
|
|||||||
scripts/Makefile
|
scripts/Makefile
|
||||||
test/Makefile
|
test/Makefile
|
||||||
test/api/Makefile
|
test/api/Makefile
|
||||||
unit-test/Makefile
|
test/unit/Makefile
|
||||||
tools/Makefile
|
tools/Makefile
|
||||||
udev/Makefile
|
udev/Makefile
|
||||||
])
|
])
|
||||||
|
@ -11,31 +11,31 @@
|
|||||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
UNIT_SOURCE=\
|
UNIT_SOURCE=\
|
||||||
unit-test/bcache_t.c \
|
test/unit/bcache_t.c \
|
||||||
unit-test/bitset_t.c \
|
test/unit/bitset_t.c \
|
||||||
unit-test/config_t.c \
|
test/unit/config_t.c \
|
||||||
unit-test/dmlist_t.c \
|
test/unit/dmlist_t.c \
|
||||||
unit-test/dmstatus_t.c \
|
test/unit/dmstatus_t.c \
|
||||||
unit-test/io_engine_t.c \
|
test/unit/io_engine_t.c \
|
||||||
unit-test/matcher_t.c \
|
test/unit/matcher_t.c \
|
||||||
unit-test/framework.c \
|
test/unit/framework.c \
|
||||||
unit-test/percent_t.c \
|
test/unit/percent_t.c \
|
||||||
unit-test/run.c \
|
test/unit/run.c \
|
||||||
unit-test/string_t.c
|
test/unit/string_t.c
|
||||||
|
|
||||||
UNIT_DEPENDS=$(subst .c,.d,$(UNIT_SOURCE))
|
UNIT_DEPENDS=$(subst .c,.d,$(UNIT_SOURCE))
|
||||||
UNIT_OBJECTS=$(UNIT_SOURCE:%.c=%.o)
|
UNIT_OBJECTS=$(UNIT_SOURCE:%.c=%.o)
|
||||||
CLEAN_TARGETS+=$(UNIT_DEPENDS) $(UNIT_OBJECTS)
|
CLEAN_TARGETS+=$(UNIT_DEPENDS) $(UNIT_OBJECTS)
|
||||||
UNIT_LDLIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio
|
UNIT_LDLIBS += $(LVMINTERNAL_LIBS) -ldevmapper -laio
|
||||||
|
|
||||||
unit-test/unit-test: $(UNIT_OBJECTS) libdm/libdevmapper.$(LIB_SUFFIX) lib/liblvm-internal.a
|
test/unit/unit-test: $(UNIT_OBJECTS) libdm/libdevmapper.$(LIB_SUFFIX) lib/liblvm-internal.a
|
||||||
@echo " [LD] $@"
|
@echo " [LD] $@"
|
||||||
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) -L$(top_builddir)/libdm \
|
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) -L$(top_builddir)/libdm \
|
||||||
-o $@ $(UNIT_OBJECTS) $(UNIT_LDLIBS)
|
-o $@ $(UNIT_OBJECTS) $(UNIT_LDLIBS)
|
||||||
|
|
||||||
.PHONEY: run-unit-test
|
.PHONEY: run-unit-test
|
||||||
run-unit-test: unit-test/unit-test
|
run-unit-test: test/unit/unit-test
|
||||||
@echo Running unit tests
|
@echo Running unit tests
|
||||||
LD_LIBRARY_PATH=libdm unit-test/unit-test run
|
LD_LIBRARY_PATH=libdm test/unit/unit-test run
|
||||||
|
|
||||||
-include $(UNIT_DEPENDS)
|
-include $(UNIT_DEPENDS)
|
Loading…
Reference in New Issue
Block a user