upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorYour Name <you@example.com>2026-05-23 02:18:41 +0530
committerYour Name <you@example.com>2026-05-23 02:18:41 +0530
commit10c69b0ddc34a1fafada3f8b68a622b4aa2bea77 (patch)
treeee85d02a1569adc70364b6acaea0beb0b4038526 /tests/unit
parent969dfe9ea52ed304ae44d7f7adbc5219f90497dd (diff)
chore: fix unit test build rules, add relay_selector+relay_validator tests, persist core extraction planHEADmaster
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/Makefile8
-rw-r--r--tests/unit/stubs/freertos/FreeRTOS.h1
-rwxr-xr-xtests/unit/test_beacon_pricebin35744 -> 0 bytes
-rwxr-xr-xtests/unit/test_displaybin24816 -> 0 bytes
-rwxr-xr-xtests/unit/test_firewall_sandboxbin30568 -> 0 bytes
-rwxr-xr-xtests/unit/test_marketbin49456 -> 0 bytes
-rwxr-xr-xtests/unit/test_mining_paymentbin28664 -> 0 bytes
-rwxr-xr-xtests/unit/test_negentropy_adapterbin21216 -> 0 bytes
-rwxr-xr-xtests/unit/test_session_payment_methodbin54680 -> 0 bytes
-rwxr-xr-xtests/unit/test_stratum_proxybin40784 -> 0 bytes
-rwxr-xr-xtests/unit/test_tollgate_client_miningbin48448 -> 0 bytes
11 files changed, 8 insertions, 1 deletions
diff --git a/tests/unit/Makefile b/tests/unit/Makefile
index b0b6922..cb06472 100644
--- a/tests/unit/Makefile
+++ b/tests/unit/Makefile
@@ -22,7 +22,7 @@ LDFLAGS := -lmbedcrypto -lcjson -lm
22 22
23SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o 23SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o
24 24
25TESTS := 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_display test_negentropy_adapter test_beacon_price test_market test_mint_health test_mining_payment test_stratum_proxy test_session_payment_method test_tollgate_client_mining test_firewall_sandbox 25TESTS := 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_beacon_price test_market test_mint_health test_mining_payment test_stratum_proxy test_session_payment_method test_tollgate_client_mining test_firewall_sandbox test_relay_selector test_relay_validator
26 26
27.PHONY: all test clean $(TESTS) 27.PHONY: all test clean $(TESTS)
28 28
@@ -105,5 +105,11 @@ test_tollgate_client_mining: test_tollgate_client_mining.c
105test_firewall_sandbox: test_firewall_sandbox.c $(REPO_ROOT)/main/firewall.c 105test_firewall_sandbox: test_firewall_sandbox.c $(REPO_ROOT)/main/firewall.c
106 $(CC) $(CFLAGS) -include stubs/dns_server.h $< $(REPO_ROOT)/main/firewall.c -o $@ $(LDFLAGS) 106 $(CC) $(CFLAGS) -include stubs/dns_server.h $< $(REPO_ROOT)/main/firewall.c -o $@ $(LDFLAGS)
107 107
108test_relay_selector: test_relay_selector.c
109 $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
110
111test_relay_validator: test_relay_validator.c $(REPO_ROOT)/main/nostr_event.c $(REPO_ROOT)/main/identity.c $(REPO_ROOT)/components/wisp_relay/relay_validator.c $(SECP256K1_OBJ)
112 $(CC) $(CFLAGS) -I $(SECP256K1_PRIV_INC) -I $(REPO_ROOT)/main -I $(REPO_ROOT)/components/wisp_relay $< $(REPO_ROOT)/main/nostr_event.c $(REPO_ROOT)/main/identity.c $(REPO_ROOT)/components/wisp_relay/relay_validator.c $(SECP256K1_OBJ) -o $@ $(LDFLAGS)
113
108clean: 114clean:
109 rm -f $(TESTS) $(SECP256K1_OBJ) 115 rm -f $(TESTS) $(SECP256K1_OBJ)
diff --git a/tests/unit/stubs/freertos/FreeRTOS.h b/tests/unit/stubs/freertos/FreeRTOS.h
index 543d4e4..fc38846 100644
--- a/tests/unit/stubs/freertos/FreeRTOS.h
+++ b/tests/unit/stubs/freertos/FreeRTOS.h
@@ -11,6 +11,7 @@ static inline uint32_t xTaskGetTickCount(void) { return 0; }
11static inline void vTaskDelay(uint32_t ticks) { (void)ticks; } 11static inline void vTaskDelay(uint32_t ticks) { (void)ticks; }
12#define pdMS_TO_TICKS(ms) ((ms) / 10) 12#define pdMS_TO_TICKS(ms) ((ms) / 10)
13#define portTICK_PERIOD_MS 10 13#define portTICK_PERIOD_MS 10
14#define configTICK_RATE_HZ 100
14#define portMAX_DELAY 0xFFFFFFFF 15#define portMAX_DELAY 0xFFFFFFFF
15#define pdTRUE 1 16#define pdTRUE 1
16#define pdFALSE 0 17#define pdFALSE 0
diff --git a/tests/unit/test_beacon_price b/tests/unit/test_beacon_price
deleted file mode 100755
index a9f6357..0000000
--- a/tests/unit/test_beacon_price
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_display b/tests/unit/test_display
deleted file mode 100755
index 9b8364e..0000000
--- a/tests/unit/test_display
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_firewall_sandbox b/tests/unit/test_firewall_sandbox
deleted file mode 100755
index 3e2895b..0000000
--- a/tests/unit/test_firewall_sandbox
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_market b/tests/unit/test_market
deleted file mode 100755
index 8efac8e..0000000
--- a/tests/unit/test_market
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_mining_payment b/tests/unit/test_mining_payment
deleted file mode 100755
index d38bf9d..0000000
--- a/tests/unit/test_mining_payment
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_negentropy_adapter b/tests/unit/test_negentropy_adapter
deleted file mode 100755
index 64b6053..0000000
--- a/tests/unit/test_negentropy_adapter
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_session_payment_method b/tests/unit/test_session_payment_method
deleted file mode 100755
index 950a72f..0000000
--- a/tests/unit/test_session_payment_method
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_stratum_proxy b/tests/unit/test_stratum_proxy
deleted file mode 100755
index 963df67..0000000
--- a/tests/unit/test_stratum_proxy
+++ /dev/null
Binary files differ
diff --git a/tests/unit/test_tollgate_client_mining b/tests/unit/test_tollgate_client_mining
deleted file mode 100755
index d331bd1..0000000
--- a/tests/unit/test_tollgate_client_mining
+++ /dev/null
Binary files differ