Add goTool autotest with bench configs and UART scenarios.

JSON configs describe network and node MACs; scenarios run command
sequences with expect checks. Share UART client API across CLI and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-18 23:36:28 +02:00
co-authored by Cursor
parent a8ae65d9dc
commit d24b0cb5c3
17 changed files with 958 additions and 106 deletions
+13 -2
View File
@@ -6,8 +6,12 @@ GOTOOL := $(GOTOOL_DIR)/gotool
GOTOOL_RUN := cd $(GOTOOL_DIR) && go run . -port $(PORT)
.PHONY: default proto_generate proto_generate_uart proto_generate_espnow \
gotool-build gotool-proto gotool-tidy \
gotool-version gotool-clients gotool-unicast-test gotool-deadzone-get gotool-deadzone-set
gotool-build gotool-proto gotool-tidy gotool-test-units \
gotool-version gotool-clients gotool-unicast-test gotool-deadzone-get gotool-deadzone-set \
gotool-test
TEST_CONFIG ?= example-lab
TEST_SCENARIO ?= smoke
default:
@echo "Targets: proto_generate gotool-build gotool-clients gotool-version …"
@@ -51,4 +55,11 @@ gotool-deadzone-set: $(GOTOOL)
@test -n "$(DEADZONE)" || (echo "Usage: make gotool-deadzone-set DEADZONE=100 [CLIENT=16]"; exit 1)
$(GOTOOL) -port $(PORT) deadzone -set -value $(DEADZONE) -client $(or $(CLIENT),0)
gotool-test-units:
cd $(GOTOOL_DIR) && go test ./...
# CONFIG=example-lab SCENARIO=smoke
gotool-test: $(GOTOOL)
$(GOTOOL) -port $(PORT) test -config $(TEST_CONFIG) -scenario $(TEST_SCENARIO)
$(GOTOOL): gotool-build