From 3a02ca88ea595919932e6277d5cf439ccccca509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 7 Jan 2025 15:18:27 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-make:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=86=D0=B5=D0=BB=D0=B8=20`ct?= =?UTF-8?q?est`=20=D0=B8=20=D0=B5=D1=91=20=D0=BF=D1=80=D0=B8=D0=B2=D1=8F?= =?UTF-8?q?=D0=B7=D0=BA=D0=B0=20=D0=BA=20`make=20check`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GNUmakefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index b0e669e6..355ce295 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -54,6 +54,8 @@ CFLAGS_EXTRA ?= LD ?= ld CMAKE ?= cmake CMAKE_OPT ?= +CTEST ?= ctest +CTEST_OPT ?= # target directory for `make 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 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 +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 ifeq ($(wildcard mdbx.c),mdbx.c) #< dist-cutoff-end @@ -418,7 +424,7 @@ MDBX_SMOKE_EXTRA ?= check: DESTDIR = $(shell pwd)/@check-install 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: smoke