diff --git a/implementations/Crafter.Build-Test.cpp b/implementations/Crafter.Build-Test.cpp index fef2108..3d68fa2 100644 --- a/implementations/Crafter.Build-Test.cpp +++ b/implementations/Crafter.Build-Test.cpp @@ -16,11 +16,6 @@ namespace { return target.find("windows") != std::string_view::npos || target.find("mingw") != std::string_view::npos; } - fs::path TestBinaryPath(const Configuration& cfg) { - fs::path outputDir = cfg.BinDir(); - return outputDir / (TargetIsWindows(cfg.target) ? std::format("{}.exe", cfg.outputName) : cfg.outputName); - } - // MatchGlob/MatchAny live in :Platform — shared with the lint verb. std::string JoinAndQuoteArgs(std::span args) { @@ -615,7 +610,12 @@ TestSummary Crafter::RunTests(Configuration& projectCfg, const RunTestsOptions& } std::chrono::seconds timeout = opts.timeoutOverride.value_or(t.timeout); - fs::path binary = TestBinaryPath(t.config); + // The file the link wrote, by the rule the staleness checks and -r + // use, which for a wasm32 executable is the .wasm the link + // writes. A rule of its own here once added .exe for any Windows + // triple and nothing for wasm, so every wasm test was handed to + // wasmtime without the .wasm it was linked as. + fs::path binary = ExpectedOutput(t.config); try { r = RunSingleTest(t, binary, timeout); } catch (const std::exception& e) {