mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-15 22:24:30 +08:00
mdbx-make: добавление цели ctest
и её привязка к make check
.
This commit is contained in:
parent
16997a88b0
commit
3a02ca88ea
10
GNUmakefile
10
GNUmakefile
@ -54,6 +54,8 @@ CFLAGS_EXTRA ?=
|
|||||||
LD ?= ld
|
LD ?= ld
|
||||||
CMAKE ?= cmake
|
CMAKE ?= cmake
|
||||||
CMAKE_OPT ?=
|
CMAKE_OPT ?=
|
||||||
|
CTEST ?= ctest
|
||||||
|
CTEST_OPT ?=
|
||||||
# target directory for `make dist`
|
# target directory for `make dist`
|
||||||
DIST_DIR ?= dist
|
DIST_DIR ?= dist
|
||||||
|
|
||||||
@ -295,9 +297,13 @@ lib-shared libmdbx.$(SO_SUFFIX): mdbx-dylib.o $(call select_by,MDBX_BUILD_CXX,md
|
|||||||
|
|
||||||
ninja: cmake-build
|
ninja: cmake-build
|
||||||
cmake-build:
|
cmake-build:
|
||||||
@echo "-G Ninja . && cmake --build ."
|
@echo " RUN: cmake -G Ninja && cmake --build"
|
||||||
$(QUIET)mkdir -p @cmake-ninja-build && $(CMAKE) $(CMAKE_OPT) -G Ninja -S . -B @cmake-ninja-build && $(CMAKE) --build @cmake-ninja-build
|
$(QUIET)mkdir -p @cmake-ninja-build && $(CMAKE) $(CMAKE_OPT) -G Ninja -S . -B @cmake-ninja-build && $(CMAKE) --build @cmake-ninja-build
|
||||||
|
|
||||||
|
ctest: cmake-build
|
||||||
|
@echo " RUN: ctest .."
|
||||||
|
$(QUIET)$(CTEST) --test-dir @cmake-ninja-build --parallel `(nproc | sysctl -n hw.ncpu | echo 2) 2>/dev/null` --schedule-random $(CTEST_OPT)
|
||||||
|
|
||||||
#> dist-cutoff-begin
|
#> dist-cutoff-begin
|
||||||
ifeq ($(wildcard mdbx.c),mdbx.c)
|
ifeq ($(wildcard mdbx.c),mdbx.c)
|
||||||
#< dist-cutoff-end
|
#< dist-cutoff-end
|
||||||
@ -418,7 +424,7 @@ MDBX_SMOKE_EXTRA ?=
|
|||||||
|
|
||||||
check: DESTDIR = $(shell pwd)/@check-install
|
check: DESTDIR = $(shell pwd)/@check-install
|
||||||
check: CMAKE_OPT = -Werror=dev
|
check: CMAKE_OPT = -Werror=dev
|
||||||
check: smoke-assertion ninja dist install test
|
check: smoke-assertion ninja dist install test ctest
|
||||||
|
|
||||||
smoke-assertion: MDBX_BUILD_OPTIONS:=$(strip $(MDBX_BUILD_OPTIONS) -DMDBX_FORCE_ASSERTIONS=1 -UNDEBUG -DMDBX_DEBUG=0)
|
smoke-assertion: MDBX_BUILD_OPTIONS:=$(strip $(MDBX_BUILD_OPTIONS) -DMDBX_FORCE_ASSERTIONS=1 -UNDEBUG -DMDBX_DEBUG=0)
|
||||||
smoke-assertion: smoke
|
smoke-assertion: smoke
|
||||||
|
Loading…
x
Reference in New Issue
Block a user