From d43e39e747a0b4257cc5d355a0f1b10eb9e18a69 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 20 Jan 2026 17:21:38 +0100 Subject: [PATCH 1/4] fix-test-list --- cli.js | 11 +++++++---- utils/params.js | 2 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cli.js b/cli.js index c5a51dfa..ab18e1dc 100644 --- a/cli.js +++ b/cli.js @@ -109,12 +109,15 @@ function parseCliFlag(argument) { throw Error(message); } let value = parts.slice(1).join("="); - if (flagName === "no-prefetch") value = "false"; + if (flagName.startsWith("no-")) value = "false"; else if (value === "") value = "true"; cliParams.set(CLI_PARAMS[flagName].param, value); } +const printHelp = cliParams.delete("help"); +const dumpTestList = cliParams.delete("dumpTestList"); + if (cliArgs.length) { let tests = cliParams.has("test") ? cliParams.get("tests").split(",") : [] tests = tests.concat(cliArgs); @@ -126,7 +129,6 @@ if (cliParams.size) load("./utils/params.js"); - async function runJetStream() { try { await JetStream.initialize(); @@ -169,9 +171,10 @@ function help(message=undefined) { } } -if (cliParams.has("help")) { + +if (printHelp) { help(); -} else if (cliParams.has("dumpTestList")) { +} else if (dumpTestList) { JetStream.dumpTestList(); } else { runJetStream(); diff --git a/utils/params.js b/utils/params.js index 92a632e9..16db4356 100644 --- a/utils/params.js +++ b/utils/params.js @@ -45,7 +45,6 @@ class Params { RAMification = false; forceGC = false; dumpJSONResults = false; - dumpTestList = false; // Override iteration and worst-case counts per workload. // Example: // testIterationCountMap = { "acorn-wtb": 5 }; @@ -70,7 +69,6 @@ class Params { this.RAMification = this._parseBooleanParam(sourceParams, "RAMification"); this.dumpJSONResults = this._parseBooleanParam(sourceParams, "dumpJSONResults"); this.groupDetails = this._parseBooleanParam(sourceParams, "groupDetails"); - this.dumpTestList = this._parseBooleanParam(sourceParams, "dumpTestList"); this.forceGC = this._parseBooleanParam(sourceParams, "forceGC"); this.customPreIterationCode = this._parseStringParam(sourceParams, "customPreIterationCode"); From 1348095bd6a7873c5d813029e6dfb656ae5f2524 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 20 Jan 2026 17:29:59 +0100 Subject: [PATCH 2/4] add-basic-test --- cli.js | 4 ++-- tests/helper.mjs | 4 ++-- tests/run-shell.mjs | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/cli.js b/cli.js index ab18e1dc..e05211da 100644 --- a/cli.js +++ b/cli.js @@ -175,7 +175,7 @@ function help(message=undefined) { if (printHelp) { help(); } else if (dumpTestList) { - JetStream.dumpTestList(); + JetStream.dumpTestList(); } else { - runJetStream(); + runJetStream(); } diff --git a/tests/helper.mjs b/tests/helper.mjs index e8287a06..2bf0b0f7 100644 --- a/tests/helper.mjs +++ b/tests/helper.mjs @@ -37,7 +37,7 @@ export function logInfo(...args) { } export function logError(...args) { - let error; + console.error("Error:"); if (args.length == 1 && args[0] instanceof Error) error = args[0]; const text = args.join(" "); @@ -124,7 +124,7 @@ export async function sh(binary, ...args) { try { return await spawnCaptureStdout(binary, args); } catch(e) { - logError(e.stdoutString); + // logError(e.stdoutString); throw e; } finally { if (GITHUB_ACTIONS_OUTPUT) diff --git a/tests/run-shell.mjs b/tests/run-shell.mjs index 7944dce0..8a7bd137 100644 --- a/tests/run-shell.mjs +++ b/tests/run-shell.mjs @@ -44,6 +44,13 @@ const TESTS = [ return runTest("UnitTests", () => sh(shell_binary, UNIT_TEST_PATH)); }, }, + { + name: "CLI Help", + tags: ["all", "main", "help"], + run(shell_binary) { + return runCLITest("Cli Help", shell_binary, "--help"); + }, + }, { name: "Single Suite", tags: ["all", "main", "single"], From c1d301356e503fbfa25cdd18d80c646b64b7de5a Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 20 Jan 2026 17:40:19 +0100 Subject: [PATCH 3/4] cleanup --- tests/helper.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/helper.mjs b/tests/helper.mjs index 2bf0b0f7..b50d86ff 100644 --- a/tests/helper.mjs +++ b/tests/helper.mjs @@ -37,7 +37,6 @@ export function logInfo(...args) { } export function logError(...args) { - console.error("Error:"); if (args.length == 1 && args[0] instanceof Error) error = args[0]; const text = args.join(" "); @@ -124,7 +123,7 @@ export async function sh(binary, ...args) { try { return await spawnCaptureStdout(binary, args); } catch(e) { - // logError(e.stdoutString); + logError(e.stdoutString); throw e; } finally { if (GITHUB_ACTIONS_OUTPUT) From ac9185a20d2de8c58ca054b55ce365c3dbcc2dc3 Mon Sep 17 00:00:00 2001 From: Camillo Bruni Date: Tue, 20 Jan 2026 17:40:55 +0100 Subject: [PATCH 4/4] format --- tests/helper.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/helper.mjs b/tests/helper.mjs index b50d86ff..e8287a06 100644 --- a/tests/helper.mjs +++ b/tests/helper.mjs @@ -37,6 +37,7 @@ export function logInfo(...args) { } export function logError(...args) { + let error; if (args.length == 1 && args[0] instanceof Error) error = args[0]; const text = args.join(" ");