test: migrate cross-arch tests to declarative test.toml; add WindowsViaWine
Collapses three outer-driver tests into declarative top-level fixtures:
- CrossArchAarch64: outer + inner pair becomes main.cpp + test.toml. The
'is this really an ARM aarch64 ELF?' artifact-introspection check is
dropped — qemu-aarch64 refuses to run wrong-arch ELFs anyway, so a
silent host-arch fallback would still fail the run.
- Wasi: outer + inner pair becomes main.cpp + test.toml. The WASM
magic-byte check is dropped on the same logic (wasmtime refuses
non-WASM input).
- Defines: simple defines-propagation smoke test becomes test.toml with
[defines] CRAFTER_TEST_FOO = "42".
Adds WindowsViaWine to replace the (forthcoming-deletion) WindowsViaSsh:
declarative target=x86_64-w64-mingw32 + requires=[tool:wine,
tool:x86_64-w64-mingw32-g++]. Exercises the new Wine runner and the
ForTarget derivation end-to-end.
Diamond and CrossProjectModule had speculative --target= reading that
made them attempt cross-compilation under the multi-target sweep. They
have no sysroot/toolchain plumbing, so those cross-builds always fail.
Hardcoded them to HostTarget(); cross-arch tests live in their own
test.toml from now on.
Refs issue #8.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dc27c5c204
commit
406a406420
16 changed files with 50 additions and 238 deletions
13
tests/CrossArchAarch64/test.toml
Normal file
13
tests/CrossArchAarch64/test.toml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# End-to-end cross-arch build:
|
||||
# crafter-build cross-compiles main.cpp for aarch64-linux-gnu using the
|
||||
# Arch Linux ARM sysroot, and the runner derivation (TestRunner::ForTarget)
|
||||
# wraps the produced ELF in `qemu-aarch64`. cfg.sysroot is forwarded to
|
||||
# QEMU_LD_PREFIX automatically so the target's dynamic linker is reachable.
|
||||
target = "aarch64-linux-gnu"
|
||||
march = "armv8-a"
|
||||
mtune = "generic"
|
||||
sysroot = "/opt/aarch64-rootfs"
|
||||
requires = [
|
||||
"tool:qemu-aarch64",
|
||||
"file:/opt/aarch64-rootfs/usr/share/libc++/v1/std.cppm",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue