Skip to content

Commit 2ac920a

Browse files
committed
test: port test/test-api.c
Signed-off-by: Hamza Chandad <hchandad@proton.me>
1 parent fd0abab commit 2ac920a

File tree

3 files changed

+487
-0
lines changed

3 files changed

+487
-0
lines changed

Config.uk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,16 @@ if LIBMIMALLOC
1919
config MIMALLOC_ASSERT
2020
bool "Enable assertions"
2121
default n
22+
config LIBMIMALLOC_TEST
23+
bool "Enable libmimalloc tests"
24+
select LIBUKTEST
25+
select LIBMIMALLOC_TEST_API
26+
default n
27+
help
28+
Enables all libmimalloc tests.
29+
if LIBMIMALLOC_TEST
30+
config LIBMIMALLOC_TEST_API
31+
bool "Enable libmimalloc api test suite"
32+
default n
33+
endif
2234
endif

Makefile.uk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,10 @@ LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/src/options.c
9393
LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/src/init.c
9494
#LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/src/alloc-override.c
9595
#LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/src/page-queue.c
96+
97+
################################################################################
98+
# Tests
99+
################################################################################
100+
ifneq ($(filter y, $(CONFIG_LIBMIMALLOC_TEST) $(CONFIG_LIBUKTEST_ALL)),)
101+
LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/test/test-api.c
102+
endif

0 commit comments

Comments
 (0)