mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
test: the JSON generators against the tables the CLI wrote
page_impl.c and rtl837x_port.c are linked together over the simulated engine, so /vlan.json, /vlanlist and /l2.json are checked against what vlan_create, pvid and the L2 table hold, through the same bytes the switch would. The L2 walk is driven the way the web page drives it, page after page until an index repeats, which is also where the repeat of the first entry is pinned down as the wrap marker the page relies on. The counter test fails on the code before the previous commit.
This commit is contained in:
1 parent
8cac67cdf7
commit
d6253ddc25
3 files changed
+223
-2
No files matched your search
+5
-1
@@ -25,7 +25,8 @@ BUILDDIR = build
|
||||
|
||||
# One binary per subsystem under test.
|
||||
TESTS = $(BUILDDIR)/test_cmd_editor \
|
||||
$(BUILDDIR)/test_port_tables
|
||||
$(BUILDDIR)/test_port_tables \
|
||||
$(BUILDDIR)/test_page_json
|
||||
|
||||
# The table tests link the register mock and one environment file; stub/
|
||||
# stands in for the two headers a firmware build generates.
|
||||
@@ -45,6 +46,9 @@ $(BUILDDIR)/test_cmd_editor: test_cmd_editor.c support.c $(SRCROOT)/cmd_editor.c
|
||||
$(BUILDDIR)/test_port_tables: test_port_tables.c $(TABLE_ENV) hw_mock.h | $(BUILDDIR)
|
||||
$(CC) $(CFLAGS) $(filter %.c,$^) -o $@ $(LDFLAGS)
|
||||
|
||||
$(BUILDDIR)/test_page_json: test_page_json.c $(TABLE_ENV) hw_mock.h | $(BUILDDIR)
|
||||
$(CC) $(CFLAGS) $(filter %.c,$^) -o $@ $(LDFLAGS)
|
||||
|
||||
run: $(TESTS)
|
||||
@fail=0; for t in $(TESTS); do \
|
||||
echo "=== $$t ==="; \
|
||||
|
||||
Reference in new issue
Block a user