Skip to content

jit_cache_all_tests: consult tests/.das_test instead of a hand-maintained --exclude list #3256

Description

@borisbat

Problem

jit_cache_all_tests (in utils/CMakeLists.txt) prewarms the JIT cache by JIT-compiling every file under tests/. Unlike the dastest sweeps, it does not consult tests/.das_test's can_visit_folder module gate. Instead it carries a hand-maintained skip list:

COMMAND ${UTIL_BIN_DIR}/jit.exe ${PROJECT_SOURCE_DIR}/tests --parallel 0 ... \
    --exclude gc --exclude dasHV --exclude dasPUGIXML --exclude dasSQLITE \
    --exclude stbimage --exclude live_host --exclude audio --exclude strudel --exclude minfft

So the set of module-gated test dirs is duplicated: once in tests/.das_test (has_module(...)) and again here.

Impact

Adding a new module-gated test directory requires updating both places. Forgetting the --exclude entry reds the per-PR build Debug lane: those lanes build a minimal daslang (optional modules — audio/pugixml/sqlite/stbimage/minfft — are only enabled in extended_checks), so the prewarm hits require <module> and fails with error[20605]: missing prerequisite '<module>' — even though the actual interp/JIT/AOT test sweeps pass cleanly (they consult .das_test and skip the dir).

Most recently hit by tests/minfft in #3255: the dir was correctly gated in .das_test and registered in tests/aot/CMakeLists.txt, but the missing --exclude minfft reddened build (linux, 64, Debug, none). Fixed there by adding the exclude, but the duplication remains a latent trap for the next module-gated dir.

Proposal

Teach the prewarm to respect .das_test so the skip list lives in one place — e.g. have jit.exe load and apply can_visit_folder the way dastest does (skip a folder when its required module isn't registered in the running binary), or otherwise filter by built-module availability. Then drop the per-module --exclude entries.

Caveat: gc is excluded here for a different reason (GC-semantics tests are interp-only under -jitheap_collect can't see jitted-frame locals), not module availability. .das_test already encodes that (gc skipped under --use-aot/-jit), so a unification should preserve the gc case rather than dropping it.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions