test(wasm): a configuration is the same with its WASI sysroot named or not
WasmSysrootKey makes two wasm32 configurations that differ in one thing: one names no sysroot and the other names the toolchain's WASI sysroot. They have to be one configuration: the same VariantId, PcmDir and BuildDir, the same std module key, and the same compile command, which names the WASI sysroot. A third, with a sysroot of its own, has another VariantId. It then builds two programs for the host in one pass, each on the same wasm32 library, which names no sysroot. The library carries -fno-exceptions, which a wasm build is refused for before it makes a directory, so the case does not depend on the machine having a WASI sysroot. The library's PcmDir has to be the same after the first program's build as before it, and the pass has to hold the library once. Against the engine as it was before the fix the test fails on each of the three: the two configurations have different VariantIds, the library's PcmDir changes with the first build, and the pass holds the library twice.
This commit is contained in:
parent
1ddba745cf
commit
a7aa22220b
2 changed files with 109 additions and 0 deletions
|
|
@ -308,6 +308,7 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
cfg.AddTest("WasmExceptions").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("WasiSysrootWithoutExceptions").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("WasmBuildRefusals").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("WasmSysrootKey").Dependencies({ CrafterBuildLib.get() });
|
||||
cfg.AddTest("RunSingleTestExit").Dependencies({ CrafterBuildLib.get() });
|
||||
// LoadProject dlopens the synthesized project.so, which references
|
||||
// Crafter:: symbols (HostTarget, Configuration ctors) that have to be
|
||||
|
|
|
|||
Loading…
Reference in a new issue