33 bench-router bench-router-json bench-router-profile \
44 bench-bbmd bench-bbmd-json bench-bbmd-profile \
55 bench-sc bench-sc-json bench-sc-profile \
6+ bench-sc-profile-client bench-sc-profile-hub \
67 docker-build docker-test docker-stress docker-test-client docker-test-bbmd \
78 docker-test-router docker-test-device-mgmt docker-test-cov-advanced \
89 docker-test-events docker-test-sc docker-test-sc-stress docker-sc-stress \
910 docker-test-router-stress docker-router-stress \
1011 docker-test-bbmd-stress docker-bbmd-stress \
1112 docker-test-ipv6 \
13+ docker-test-mixed-bip-ipv6 docker-test-mixed-bip-sc \
1214 docker-demo docker-demo-auto docker-clean
1315
1416lint :
@@ -79,14 +81,42 @@ bench-bbmd-profile:
7981bench-sc-profile :
8082 uv run python scripts/bench_sc.py --profile --sustain 10
8183
84+ # ---------------------------------------------------------------------------
85+ # Mixed-environment SC profiling (Docker ↔ local split)
86+ # ---------------------------------------------------------------------------
87+
88+ # Generate shared TLS certs for mixed SC benchmarks
89+ .sc-bench-certs :
90+ uv run python scripts/bench_sc.py --generate-certs .sc-bench-certs
91+
92+ # Profile client side: hub runs in Docker, echo nodes + stress client run locally
93+ bench-sc-profile-client : .sc-bench-certs docker-build
94+ SC_BENCH_CERTS=.sc-bench-certs $(COMPOSE ) --profile sc-bench-hub up -d
95+ @echo " Waiting for Docker hub..." && sleep 5
96+ -uv run python scripts/bench_sc.py --mode client \
97+ --hub-uri wss://localhost:4443 --cert-dir .sc-bench-certs \
98+ --profile --sustain 15
99+ SC_BENCH_CERTS=.sc-bench-certs $(COMPOSE ) --profile sc-bench-hub down
100+
101+ # Profile hub side: hub runs locally, echo nodes + stress client run in Docker
102+ bench-sc-profile-hub : .sc-bench-certs docker-build
103+ SC_BENCH_CERTS=.sc-bench-certs $(COMPOSE ) --profile sc-bench-client up -d &
104+ @echo " Waiting for Docker clients..." && sleep 10
105+ uv run python scripts/bench_sc.py --mode hub --port 4443 \
106+ --cert-dir .sc-bench-certs --profile --duration 100
107+ SC_BENCH_CERTS=.sc-bench-certs $(COMPOSE ) --profile sc-bench-client down
108+
82109# ---------------------------------------------------------------------------
83110# Docker integration tests
84111# ---------------------------------------------------------------------------
85112
113+ BAC_PY_VERSION := $(shell uv run python -c "import bac_py; print(bac_py.__version__) ")
114+ export BAC_PY_VERSION
115+
86116COMPOSE := docker compose -f docker/docker-compose.yml
87117
88118docker-build :
89- $( COMPOSE ) build --no-cache
119+ docker build --no-cache -t bac-py: $( BAC_PY_VERSION ) -f docker/Dockerfile .
90120
91121docker-test-client : docker-build
92122 $(COMPOSE ) --profile client-server up --abort-on-container-exit --exit-code-from test-client-server
@@ -128,6 +158,18 @@ docker-test-ipv6: docker-build
128158 $(COMPOSE ) --profile ipv6 up --abort-on-container-exit --exit-code-from test-ipv6
129159 $(COMPOSE ) --profile ipv6 down -v
130160
161+ docker-test-mixed-bip-ipv6 : docker-build
162+ $(COMPOSE ) --profile mixed-bip-ipv6 up --abort-on-container-exit --exit-code-from test-mixed-bip-ipv6
163+ $(COMPOSE ) --profile mixed-bip-ipv6 down -v
164+
165+ .sc-mixed-certs :
166+ uv run python -c " from docker.lib.sc_pki import generate_test_pki; from pathlib import Path; generate_test_pki(Path('.sc-mixed-certs'), names=['hub','node1','node2','router'])"
167+
168+ docker-test-mixed-bip-sc : docker-build .sc-mixed-certs
169+ SC_MIXED_CERTS=$(CURDIR ) /.sc-mixed-certs $(COMPOSE ) --profile mixed-bip-sc up --abort-on-container-exit --exit-code-from test-mixed-bip-sc
170+ SC_MIXED_CERTS=$(CURDIR ) /.sc-mixed-certs $(COMPOSE ) --profile mixed-bip-sc down -v
171+ rm -rf .sc-mixed-certs
172+
131173docker-test : docker-build
132174 $(MAKE ) docker-test-client
133175 $(MAKE ) docker-test-bbmd
@@ -138,6 +180,8 @@ docker-test: docker-build
138180 $(MAKE ) docker-test-events
139181 $(MAKE ) docker-test-sc
140182 $(MAKE ) docker-test-ipv6
183+ $(MAKE ) docker-test-mixed-bip-ipv6
184+ $(MAKE ) docker-test-mixed-bip-sc
141185
142186docker-stress : docker-build
143187 $(COMPOSE ) --profile stress-runner up --abort-on-container-exit --exit-code-from stress-runner
@@ -181,3 +225,8 @@ docker-clean:
181225 $(COMPOSE ) --profile router-stress-runner down -v --rmi local
182226 $(COMPOSE ) --profile bbmd-stress down -v --rmi local
183227 $(COMPOSE ) --profile bbmd-stress-runner down -v --rmi local
228+ $(COMPOSE ) --profile mixed-bip-ipv6 down -v --rmi local
229+ $(COMPOSE ) --profile mixed-bip-sc down -v --rmi local
230+ rm -rf .sc-mixed-certs
231+ @echo " Removing all bac-py images..."
232+ docker images --format ' {{.Repository}}:{{.Tag}}' | grep ' ^bac-py:' | xargs -r docker rmi 2> /dev/null || true
0 commit comments