Crafter.Build/implementations
Jorijn van der Graaf dc27c5c204 test: introduce test.toml + target-derived runners alongside existing machinery
Vendors toml++ v3.4.0 as lib/toml.hpp and wires it into Crafter.Build-Test
to parse a declarative test.toml manifest (target/march/mtune/sysroot/
requires/timeout/args/defines). Test discovery now treats project.cpp and
test.toml as mutually exclusive: project.cpp stays the escape hatch for
outer-driver tests, test.toml gives downstream test authors a no-boilerplate
path.

Adds:
- TestRunner::Wine() and TestRunner::ForTarget(cfg) — runner is now derived
  from cfg.target (Local for host, Wine for Windows-on-Linux, wasmtime for
  WASI, qemu-<arch> with QEMU_LD_PREFIX for non-host Linux). The env-var
  override CRAFTER_BUILD_RUNNER_<target> still wins as a power-user escape
  hatch via FromEnv.
- Declarative preconditions: tool:<name>, file:<path>, env:<VAR> are
  evaluated before the build; missing preconditions Skip without paying
  the compile cost.
- Hard-fail-unless-declared: when a derived runner's tool is missing AND
  the test didn't declare 'tool:<that>' in requires, the missing runner
  is a Fail instead of a silent Skip. Surfaces broken cross-arch CI
  config that previously hid as "skipped".
- Multi-target sweep: bare `crafter-build test` (no --target=) now
  iterates every distinct test.toml-declared target plus the host, so
  cross-arch tests run by default without the user needing to know which
  targets exist. `--target=X` bypasses the sweep.

Test struct gains a `requires_` vector so project.cpp users can declare
preconditions too (matching what test.toml writes there).

Existing tests, factories (Ssh/SshWin/Wsl/Cmd), and CRAFTER_BUILD_RUNNER_*
machinery remain intact — this commit only adds; migration and deletion
follow in subsequent commits.

Refs issue #8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 17:57:47 +02:00
..
Crafter.Build-Asset.cpp asset changes 2026-05-19 00:50:06 +02:00
Crafter.Build-Clang.cpp fix: unbreak mingw build of Crafter.Build-Clang 2026-05-27 03:15:19 +00:00
Crafter.Build-External.cpp fixed mingw warning 2026-05-27 05:43:56 +02:00
Crafter.Build-Implementation.cpp v2 nearly done 2026-04-27 07:04:42 +02:00
Crafter.Build-Interface.cpp v2 nearly done 2026-04-27 07:04:42 +02:00
Crafter.Build-Platform.cpp wasm improvements 2026-05-18 05:23:11 +02:00
Crafter.Build-Progress.cpp loading bar 2026-04-29 03:27:11 +02:00
Crafter.Build-Shader.cpp fixes 2026-05-02 21:08:51 +02:00
Crafter.Build-Test.cpp test: introduce test.toml + target-derived runners alongside existing machinery 2026-05-27 17:57:47 +02:00
main.cpp v2 nearly done 2026-04-27 07:04:42 +02:00