diff --git a/JetStreamDriver.js b/JetStreamDriver.js index 7fbced72..556b4fbb 100644 --- a/JetStreamDriver.js +++ b/JetStreamDriver.js @@ -3264,4 +3264,9 @@ if (JetStreamParams.testList.length) { benchmarks = findBenchmarksByTag("Default", defaultDisabledTags) } +if (JetStreamParams.testExcludeList.length) { + const excludeList = new Set(JetStreamParams.testExcludeList.map(name => name.toLowerCase())); + benchmarks = benchmarks.filter(benchmark => !excludeList.has(benchmark.name.toLowerCase())); +} + this.JetStream = new Driver(benchmarks); diff --git a/cli.js b/cli.js index e05211da..ea3bca02 100644 --- a/cli.js +++ b/cli.js @@ -60,6 +60,10 @@ const CLI_PARAMS = { help: "Run a specific test or comma-separated list of tests.", param: "test", }, + exclude: { + help: "Exclude a specific test or comma-separated list of tests.", + param: "exclude", + }, tag: { help: "Run tests with a specific tag or comma-separated list of tags.", param: "tag", @@ -119,7 +123,7 @@ const printHelp = cliParams.delete("help"); const dumpTestList = cliParams.delete("dumpTestList"); if (cliArgs.length) { - let tests = cliParams.has("test") ? cliParams.get("tests").split(",") : [] + let tests = cliParams.has("test") ? cliParams.get("test").split(",") : [] tests = tests.concat(cliArgs); cliParams.set("test", tests.join(",")); } diff --git a/utils/params.js b/utils/params.js index 16db4356..491fdfdf 100644 --- a/utils/params.js +++ b/utils/params.js @@ -35,6 +35,7 @@ class Params { startDelay = undefined; testList = []; + testExcludeList = []; testIterationCount = undefined; testWorstCaseCount = undefined; prefetchResources = true; @@ -83,6 +84,7 @@ class Params { } this.testList = this._parseOneOf(sourceParams, ["testList", "tag", "tags", "test", "tests"], this._parseTestListParam); + this.testExcludeList = this._parseOneOf(sourceParams, ["testExcludeList", "exclude", "excludes"], this._parseTestListParam); this.testIterationCount = this._parseOneOf(sourceParams, ["testIterationCount", "iterationCount", "iterations" ], this._parseIntParam, 1); this.testWorstCaseCount = this._parseOneOf(sourceParams, ["testWorstCaseCount", "worstCaseCount", "worst"], this._parseIntParam, 1);