test: a wasm test declared with AddTest runs under wasmtime
WasmTestRuns declares a wasm32-wasip1 test on a fixture project and runs it through RunTests, which builds it and hands it to the wasmtime runner its target derives. The test has to pass and print its own output. Before the fix every such test failed with "failed to open wasm module", because RunTests left the .wasm off. It skips where the WASI sysroot with exceptions or wasmtime is missing, as WasmHelloRuns does, so it runs in the Flatpak and skips on a development box without them.
This commit is contained in:
parent
5d843f3967
commit
3044ac34a1
3 changed files with 87 additions and 0 deletions
9
tests/WasmTestRuns/fixture/tests/hello/main.cpp
Normal file
9
tests/WasmTestRuns/fixture/tests/hello/main.cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
import std;
|
||||
|
||||
int main() {
|
||||
std::println("hello from a wasm test");
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in a new issue