test: port the cstage-only reject observers to ww; birth test/tool

Ports 708_param_shadow_mod, 712_redecl and 961_opaque_guards into
test/tool/rejects_test.ww on testenv, one commit because the three
carriers share the single asymmetric-polarity claim (cstage rejects,
wwstage accepts) that a both-stage //ww:error fixture cannot carry.
The neg_selfimp leg drops: test/wcc/data/r948_selfimport/case.ww owns
the identical both-frontend claim.
This commit is contained in:
2026-08-08 14:44:31 +09:00
parent 934f19f884
commit 16413a4864
5 changed files with 262 additions and 747 deletions

View File

@@ -412,6 +412,15 @@ MISC_WW_TESTS = test/misc/arrglob_test.ww test/misc/packedwwi_test.ww \
test/misc/stampdiag_test.ww test/misc/qualast_test.ww \
test/misc/abortmsg_test.ww
MISC_WW_TARGETS = $(MISC_WW_TESTS:%=wwtest/%)
# Ww-native driver/tool observers: single-file ww tests under
# test/tool/ on the test/testenv helper package, porting the residual
# driver/tool observer C carriers (cstage-only reject sets, wwdump_ww
# diagnostic gates, driver-CLI parity, @symbol FFI asm needles, .wwi
# wide-rune round-trips, the c6 sep soak). Compiler/driver gates like
# test/sep: they run under test-compiler.
TOOL_WW_TESTS = test/tool/rejects_test.ww
TOOL_WW_TARGETS = $(TOOL_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 \
@@ -498,7 +507,7 @@ test-compiler-smoke: $(WWFIXTURE_BIN) $(BIN)/w6c_ww $(BIN)/w6a_ww \
# ww-native sep observers that replaced the 989_sep* carriers.
test-compiler: $(WWFIXTURE_BIN) $(WRAPPER_TOOLS) $(COMPILER_WRAPPER_BINS) \
$(SEP_WW_TARGETS) $(XMOD_WW_TARGETS) $(ASM_WW_TARGETS) \
$(OBJECT_WW_TARGETS) $(MISC_WW_TARGETS)
$(OBJECT_WW_TARGETS) $(MISC_WW_TARGETS) $(TOOL_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; \
@@ -585,6 +594,14 @@ $(OBJECT_WW_TARGETS): wwtest/%: $(BIN)/ww $(BIN)/w6c $(BIN)/w6a \
$(MISC_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 $(BIN)/wwdump $(BIN)/wwdump_ww
# The tool observers drive both driver stages, both bare frontend/
# assembler/linker triples, and the wwstage checker/dumper. wwdump_ww,
# never cstage wwdump: the -c/-r arms and the asserttyped diagnostics
# under observation are wwstage-only (wwstage-warn-audit rule).
$(TOOL_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 $(BIN)/wwdump_ww
@echo "ww test $*"
@mkdir -p $(WWBUILD)/wwtest/$(subst /,_,$*)
@WW_TEST_REPO=$(CURDIR) $(BIN)/ww test \