From 6bae5c5c90a0ebdafe8ecfd5a42560dcbb8cef5a Mon Sep 17 00:00:00 2001 From: avicarmeli <32562196+avicarmeli@users.noreply.github.com> Date: Mon, 12 Oct 2026 20:16:21 +0300 Subject: [PATCH] test: run CPU VLAN variants in the standard host suite --- test/Makefile | 11 ++++++++++- test/cpu_vlan.mk | 10 ---------- 2 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 test/cpu_vlan.mk diff --git a/test/Makefile b/test/Makefile index ae3884ac..c817897d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -28,7 +28,10 @@ TESTS = $(BUILDDIR)/test_cmd_editor \ $(BUILDDIR)/test_port_tables \ $(BUILDDIR)/test_page_json \ $(BUILDDIR)/test_httpd_tx \ - $(BUILDDIR)/test_tick_gate + $(BUILDDIR)/test_tick_gate \ + $(BUILDDIR)/test_cpu_vlan_full \ + $(BUILDDIR)/test_cpu_vlan_restricted \ + $(BUILDDIR)/test_cpu_vlan_8372 # The table tests link the register mock and one environment file; stub/ # stands in for the two headers a firmware build generates. @@ -59,6 +62,12 @@ $(BUILDDIR)/test_page_json: test_page_json.c $(TABLE_ENV) hw_mock.h | $(BUILDDIR $(BUILDDIR)/test_httpd_tx: test_httpd_tx.c $(SRCROOT)/httpd/httpd.c $(SRCROOT)/uip/uip.c | $(BUILDDIR) $(CC) $(CFLAGS) $(filter %.c,$^) -o $@ $(LDFLAGS) +# CPU VLAN initialization with full and reduced user-port ranges. +$(BUILDDIR)/test_cpu_vlan_restricted: CFLAGS += -DRTLP_TEST_MAX_PORT=7 +$(BUILDDIR)/test_cpu_vlan_8372: CFLAGS += -DRTLP_TEST_MAX_PORT=7 -DRTLP_TEST_MIN_PORT=3 -DRTLP_TEST_IS8373=0 +$(BUILDDIR)/test_cpu_vlan_full $(BUILDDIR)/test_cpu_vlan_restricted $(BUILDDIR)/test_cpu_vlan_8372: test_cpu_vlan.c $(TABLE_ENV) | $(BUILDDIR) + $(CC) $(CFLAGS) $(filter %.c,$^) -o $@ $(LDFLAGS) + run: $(TESTS) @fail=0; for t in $(TESTS); do \ echo "=== $$t ==="; \ diff --git a/test/cpu_vlan.mk b/test/cpu_vlan.mk deleted file mode 100644 index c03def88..00000000 --- a/test/cpu_vlan.mk +++ /dev/null @@ -1,10 +0,0 @@ -# Invoke: make -C test -f Makefile -f cpu_vlan.mk run-cpu-vlan -CPU_TESTS=build/test_cpu_vlan_full build/test_cpu_vlan_restricted build/test_cpu_vlan_8372 -build/test_cpu_vlan_full: test_cpu_vlan.c $(TABLE_ENV) | build - $(CC) $(CFLAGS) -no-pie $(filter %.c,$^) -o $@ $(LDFLAGS) -build/test_cpu_vlan_restricted: test_cpu_vlan.c $(TABLE_ENV) | build - $(CC) $(CFLAGS) -no-pie -DRTLP_TEST_MAX_PORT=7 $(filter %.c,$^) -o $@ $(LDFLAGS) -build/test_cpu_vlan_8372: test_cpu_vlan.c $(TABLE_ENV) | build - $(CC) $(CFLAGS) -no-pie -DRTLP_TEST_MAX_PORT=7 -DRTLP_TEST_MIN_PORT=3 -DRTLP_TEST_IS8373=0 $(filter %.c,$^) -o $@ $(LDFLAGS) -run-cpu-vlan: $(CPU_TESTS) - @for t in $(CPU_TESTS); do $$t || exit 1; done