test: 995_self_rebuild — wwstage rebuilds itself byte-identical
Drives ww_ww (which already shells to 6c_ww/6a_ww/6l_ww) over each wwstage tool's source and diffs the resulting binary against the cstage-built canonical in $BIN. A green run means the toolchain can recompile itself end-to-end without invoking cc, modulo the cold-start binary that brings the wwstage into existence. Stricter than `make bootstrap`: that loop pins wwdump's cgen self-stabilising; this pins all five wwstage tools (6c, 6a, 6l, ww, wwdump) round-tripping through the wwstage pipeline. The .combined.ww refreshes are the expander picking up the parser/cgen changes from the prior commit. selfhost/cmd/6c/ gains its main.combined.ww for the first time — 995 builds it, 994 reads it.
This commit is contained in:
7
Makefile
7
Makefile
@@ -188,7 +188,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
|
||||
$(BIN)/test_6c $(BIN)/test_6a $(BIN)/test_6l $(BIN)/test_arch \
|
||||
$(BIN)/test_e2e $(BIN)/test_ffi $(BIN)/test_dyn $(BIN)/test_stdlib \
|
||||
$(BIN)/test_selfhost $(BIN)/test_6a_ww $(BIN)/test_6l_ww \
|
||||
$(BIN)/test_6c_ww $(BIN)/test_ww_ww
|
||||
$(BIN)/test_6c_ww $(BIN)/test_ww_ww $(BIN)/test_self_rebuild
|
||||
|
||||
$(BIN)/test_smoke: test/wwc/000_smoke.c $(LIB)/libwwc.a | $(BIN)
|
||||
$(CC) $(CFLAGS) $(INCS) -o $@ $< -L$(LIB) -lwwc
|
||||
@@ -247,6 +247,11 @@ $(BIN)/test_ww_ww: test/wwc/993_ww_ww.c $(BIN)/ww $(BIN)/ww_ww \
|
||||
$(BIN)/6c $(BIN)/6a $(BIN)/6l $(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
$(BIN)/test_self_rebuild: test/wwc/995_self_rebuild.c $(BIN)/ww_ww \
|
||||
$(BIN)/6c_ww $(BIN)/6a_ww $(BIN)/6l_ww $(BIN)/wwdump_ww \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
test: all $(TESTS)
|
||||
@WW=$(BIN)/ww BIN=$(BIN) sh test/run
|
||||
|
||||
|
||||
Reference in New Issue
Block a user