Testing system needs an overhaul #8
Labels
No labels
bug
claude:done
claude:failed
claude:in-progress
claude:ready
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Catcrafts/Crafter.Build#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The current testing system works, but it has accumulated complexity that makes it bloated, fragile, and hard to reason about. Want to step back and redesign it before adding more tests.
Concerns
TestRunner(Local / Ssh / SshWin / Wsl / Cmd / FromSpec / FromEnv) is broad, env-var driven, and the flow fromCRAFTER_BUILD_RUNNER_<target>→FromEnv→ per-test execution is hard to follow.tests/WindowsViaSshdepends on a reachablewinvmand anssh + scp + cmd.exechain. Skips on missing env/host are silent, debugging failures is painful.Proposals
Shell::Cmd). some tests require an msvc toolchain that is not in wine, drop them.project.cppwhat arch/OS a test targets, and let the harness skip/route without env-var gymnastics. Also support genuinely arch-agnostic tests.Backwards compatibility does not matter, if there is a breaking change that is better then make it.
We need to reason from "What does the user want?" first and then reason how to implement that.
Current testing system is badto Testing system needs an overhaulclaude:claim:dc5801a5-b0ff-4f13-b772-4f656d99cdb2
Claude exited with code 3.
tests/MatMul/ # user #1, default case
main.cpp # synthesized, runs at host or --target=...
tests/SimdNeon/ # user #1, target-specific
test.toml # target = "aarch64-linux-gnu", requires = [...]
main.cpp
tests/Incremental/ # user #2, outer-driver
project.cpp # full power, ParentLib(...), defines, deps
Incremental.cpp
inner/ # the inner fixture this test drives
Runner table (replaces
Local/Ssh/SshWin/Wsl/Cmd/FromSpec/FromEnvmachinery):*-linux-gnunon-hostqemu-<arch>(skip if missing)wasm32-wasip1wasmtime(skip if missing)*-w64-mingw32,*-windows-*on Linuxwine(skip if missing)One concept: prefix runner.
Localis the empty prefix. SSH/SshWin/Wsl/transport machinery (copy/exec/cleanup,Shellenum, WSL path translation) deleted.In-repo test triage
After the redesign:
WindowsViaSsh,SshRunner,QemuUser(these tested the env-var → runner plumbing that no longer exists; the new runner derivation is exercised implicitly every timeCuda/Wasi/CrossArchAarch64/newWindowsViaWinerun).HelloWorld,WithModule,Defines,CrossArchAarch64,Wasi, newWindowsViaWine,CrossArchAarch64.Incremental,Libraries,Cuda,Diamond,CrossProjectModule,Shader,ShaderDep,BuildError,RunnerClassification,UnitLib. These genuinely test the build engine.Things I want to confirm before implementing
Awaiting your input on those four design choices before I draft the implementation plan. Or if you want to talk through any of them before locking in — happy to.
Yes that is a good mindset, we should prioritize downstream users over the tests in this repo.
I agree with this plan.