ww driver: zero discovered tests is a loud failure

rundirtests returned rc=0 when it discovered no tests — a typo'd
path or empty corpus read as success. Fail loudly, matching the
cstage driver.
This commit is contained in:
2026-06-13 10:20:46 +09:00
parent 675a0368cd
commit 8f370533bb
4 changed files with 178 additions and 0 deletions

View File

@@ -266,6 +266,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_wwdumpgate_run \
$(BIN)/test_datargate_run \
$(BIN)/test_dynentry_run \
$(BIN)/test_zerotest_run \
$(BIN)/test_ampfncollide_run \
$(BIN)/test_trycallcollide_run \
$(BIN)/test_gunsigned_run \
@@ -860,6 +861,16 @@ $(BIN)/test_dynentry_run: test/wcc/989_dynentry_run.c \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_zerotest_run (#64, F15 c7): `ww test <dir>` over a directory with no
# *_test.ww files fails loud (rc=1 + "no *_test.ww files in ...") instead of a
# silent rc=0 false-green. Runs both driver twins (rule-10). See the header.
$(BIN)/test_zerotest_run: test/wcc/989_zerotest_run.c \
$(BIN)/ww $(BIN)/ww_ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_ampfncollide_run (#4, c2): `&fn` synthesis (unoptype TK_AMP +
# assignableaddrfn) prefers the current module's fn when a same-leaf fn is
# declared in a later module. Builds/rejects on BOTH driver twins (rule-10).