From 78d0c3795e9a90a9f99178e38346a53d9b2ebe57 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 May 2026 19:14:45 +0530 Subject: Add test_mint_health: 14 host unit tests for mint health module Tests: init, get_all, initial state, is_reachable, mark_unreachable, overflow handling, empty init, callback registration, reinit, start/stop. Adds freertos/semphr.h stub and pdTRUE to FreeRTOS.h stub. --- tests/unit/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/unit/Makefile') diff --git a/tests/unit/Makefile b/tests/unit/Makefile index f47ef23..fc84c4e 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile @@ -22,7 +22,7 @@ LDFLAGS := -lmbedcrypto -lcjson -lm SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o -TESTS := test_geohash test_identity test_nostr_event test_cashu test_session test_tollgate_client test_lnurl_pay test_lightning_payout test_mcp_handler test_nip04 test_cvm_server +TESTS := test_geohash test_identity test_nostr_event test_cashu test_session test_tollgate_client test_lnurl_pay test_lightning_payout test_mcp_handler test_nip04 test_cvm_server test_mint_health .PHONY: all test clean $(TESTS) @@ -81,5 +81,8 @@ test_nip04: test_nip04.c $(REPO_ROOT)/main/nip04.c $(SECP256K1_OBJ) test_cvm_server: test_cvm_server.c $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) +test_mint_health: test_mint_health.c $(REPO_ROOT)/main/mint_health.c + $(CC) -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-sign-compare -std=gnu17 -g -O0 -DTEST_HOST -include stubs/esp_err.h -I $(REPO_ROOT)/main -I stubs -I $(SECP256K1_INC) -I $(SECP256K1_CFG) -I /usr/include/cjson $< $(REPO_ROOT)/main/mint_health.c -o $@ $(LDFLAGS) + clean: rm -f $(TESTS) $(SECP256K1_OBJ) -- cgit v1.2.3