From d1591a16affecdd9bfe88624d74359174891c258 Mon Sep 17 00:00:00 2001 From: Doehyun Baek Date: Sun, 11 Feb 2024 15:50:15 +0900 Subject: [PATCH] fix no benchmark not working for wasm --- tests/run-tests.cts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/run-tests.cts b/tests/run-tests.cts index 408e2afa..6698e471 100644 --- a/tests/run-tests.cts +++ b/tests/run-tests.cts @@ -222,7 +222,9 @@ async function runOnlineTests(names: string[], options) { 'image-convolute', // asm2wasm - f64-to-int is too large 'lichess', // failing test 'livesplit', // uses simd, filter for now - 'onnxjs', // failing test + 'onnxjs', // // unknown func: failed to find name `$1000008`" + 'hnset-bench', // no benchmark generated + 'fractals' // no benchmark generated ] names = names.filter((n) => !filter.includes(n)) let successfull = 0; @@ -333,13 +335,13 @@ async function testWebPage(testPath: string, options): Promise { await benchmark.save(benchmarkPath, options) let m = p_roundTrip() let roundTripTime = m.duration - if (options.jsBackend != true) { - return { testPath, roundTripTime, success: true } - } let subBenchmarkNames = await getDirectoryNames(benchmarkPath) if (subBenchmarkNames.length === 0) { return { testPath, roundTripTime, success: false, reason: 'no benchmark was generated' } } + if (options.jsBackend != true) { + return { testPath, roundTripTime, success: true } + } let runtimes = benchmark.instrumentBinaries() // await copyDir(benchmarkPath, testBenchmarkPath)