test: port the xmod collide observers to ww; birth test/xmod

test/xmod/collide_test.ww replaces 989_fnptrcollide_run.c and
989_barefn_collide_run.c with every assertion preserved (build-reject
both stages; run-exit 9 + exactly-one TEXT main.run/aa.run + cs==ww).
Makefile grows the XMOD_WW_TESTS block mirroring SEP_WW_TESTS, wired
into test-compiler.
This commit is contained in:
2026-08-08 14:28:39 +09:00
parent 89a4b82ba3
commit 57675431e2
4 changed files with 155 additions and 431 deletions

View File

@@ -366,6 +366,14 @@ SEP_WW_TESTS = test/sep/sepbuild_test.ww test/sep/sepimport_test.ww \
test/sep/seplink_test.ww test/sep/sepscratch_test.ww \
test/sep/septest_test.ww test/sep/m3sep_test.ww
SEP_WW_TARGETS = $(SEP_WW_TESTS:%=wwtest/%)
# Ww-native multi-module-TREE observers: single-file ww tests under
# test/xmod/ on the test/testenv helper package, porting the residual
# multi-module C carriers (import-tree collisions, path-mangle and
# label-mangle runs, cross-module typecheck rejects, enumerator
# capacity, directive adjacency). Compiler/driver gates like test/sep:
# they run under test-compiler.
XMOD_WW_TESTS = test/xmod/collide_test.ww
XMOD_WW_TARGETS = $(XMOD_WW_TESTS:%=wwtest/%)
BOOTSTRAP_WRAPPER_SOURCES = test/wcc/950_selfcheck.c \
test/wcc/991_w6a_ww.c \
test/wcc/992_w6l_ww.c test/wcc/993_ww_ww.c \
@@ -451,7 +459,7 @@ test-compiler-smoke: $(WWFIXTURE_BIN) $(BIN)/w6c_ww $(BIN)/w6a_ww \
# gates that cannot be represented by a single compiler fixture, plus the
# ww-native sep observers that replaced the 989_sep* carriers.
test-compiler: $(WWFIXTURE_BIN) $(WRAPPER_TOOLS) $(COMPILER_WRAPPER_BINS) \
$(SEP_WW_TARGETS)
$(SEP_WW_TARGETS) $(XMOD_WW_TARGETS)
@$(CURDIR)/$(WWFIXTURE_BIN) -j $(JOBS)
@set -e; for t in $(COMPILER_WRAPPER_BINS); do \
echo "compiler artifact $$t"; BIN=$(CURDIR)/$(BIN) $(CURDIR)/$$t; \
@@ -499,6 +507,18 @@ $(SEP_WW_TARGETS): wwtest/%: $(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
-w $(WWBUILD)/wwtest/$(subst /,_,$*) \
-I $(CURDIR)/test $*
# The xmod observers drive both driver stages (and the modreset row the
# raw w6c/w6a/w6l chain) end-to-end, so both full per-stage toolchains
# are prerequisites.
$(XMOD_WW_TARGETS): wwtest/%: $(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(LIB)/libwwrt.a $(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww \
$(BIN)/w6l_ww
@echo "ww test $*"
@mkdir -p $(WWBUILD)/wwtest/$(subst /,_,$*)
@WW_TEST_REPO=$(CURDIR) $(BIN)/ww test \
-w $(WWBUILD)/wwtest/$(subst /,_,$*) \
-I $(CURDIR)/test $*
test-lang: $(LANG_TEST_TARGETS)
test-library: $(LIBRARY_TEST_TARGETS) $(BIN)/w6c $(BIN)/w6c_ww \