Skip to content

Commit b400dd3

Browse files
Merge pull request #192 from Constellation/dump-test-list
Handle dumpTestList source params
2 parents 584ef4d + 9f636d9 commit b400dd3

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

params.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Params {
4040

4141
RAMification = false;
4242
dumpJSONResults = false;
43+
dumpTestList = false;
4344
testIterationCountMap = new Map();
4445
testWorstCaseCountMap = new Map();
4546

@@ -60,16 +61,17 @@ class Params {
6061
this.prefetchResources = this._parseBooleanParam(sourceParams, "prefetchResources");
6162
this.RAMification = this._parseBooleanParam(sourceParams, "RAMification");
6263
this.dumpJSONResults = this._parseBooleanParam(sourceParams, "dumpJSONResults");
64+
this.dumpTestList = this._parseBooleanParam(sourceParams, "dumpTestList");
6365

6466
this.customPreIterationCode = this._parseStringParam(sourceParams, "customPreIterationCode");
6567
this.customPostIterationCode = this._parseStringParam(sourceParams, "customPostIterationCode");
6668

67-
this.startDelay = this._parseIntParam(sourceParams, "startDelay", 0);
69+
this.startDelay = this._parseIntParam(sourceParams, "startDelay", 0);
6870
if (this.shouldReport && !this.startDelay)
6971
this.startDelay = 4000;
7072

7173
for (const paramKey of ["tag", "tags", "test", "tests"])
72-
this.testList = this._parseTestListParam(sourceParams, paramKey);
74+
this.testList = this._parseTestListParam(sourceParams, paramKey);
7375

7476
this.testIterationCount = this._parseIntParam(sourceParams, "iterationCount", 1);
7577
this.testWorstCaseCount = this._parseIntParam(sourceParams, "worstCaseCount", 1);
@@ -81,13 +83,13 @@ class Params {
8183

8284
_parseTestListParam(sourceParams, key) {
8385
if (!sourceParams.has(key))
84-
return this.testList;
86+
return this.testList;
8587
let testList = [];
8688
if (sourceParams?.getAll) {
87-
testList = sourceParams?.getAll(key);
89+
testList = sourceParams?.getAll(key);
8890
} else {
89-
// fallback for cli sourceParams which is just a Map;
90-
testList = sourceParams.get(key).split(",");
91+
// fallback for cli sourceParams which is just a Map;
92+
testList = sourceParams.get(key).split(",");
9193
}
9294
sourceParams.delete(key);
9395
if (this.testList.length > 0 && testList.length > 0)

0 commit comments

Comments
 (0)