Skip to content

Commit 62eaa3f

Browse files
committed
Added validation to test priority option and updated README and test fixture.
1 parent 144f6d7 commit 62eaa3f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ _The default WPT server can also be specified via environment variable `WEBPAGET
125125
* **--tsview** _\<id\>_: test name to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb)
126126
* **--tsviewconfigs** _\<string\>_: configs to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb)
127127
* **--affinity** _\<string\>_: string to hash test to a specific test agent. tester will be picked by index among available testers
128+
* **--priority** _\<number\>_: change test priority (0-9) [enforced by API key, otherwise 5]
128129
* **--noads**: block ads defined by adblockrules.org
129130
* **--continuous**: capture video continuously (unstable/experimental, may cause tests to fail)
130131
* **--spdy3**: force SPDY version 3 (Chrome only)
@@ -447,7 +448,9 @@ wpt.runTest(script, function(err, data) {
447448
* **medianVideo**: _Boolean_, store the video from the median run when capturing video is enabled
448449
* **htmlBody**: _Boolean_, save the content of only the base HTML response
449450
* **tsView**: _String_, test name to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb)
451+
* **tsViewConfigs**: _String_, configs to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb)
450452
* **affinity**: _String_, string to hash test to a specific test agent. tester will be picked by index among available testers
453+
* **priority**: _Number_, change test priority (0-9) [enforced by API key, otherwise 5]
451454
* **blockAds**: _Boolean_, block ads defined by adblockrules.org
452455
* **continuousVideoCapture**: _Boolean_, capture video continuously (unstable/experimental, may cause tests to fail)
453456
* **forceSpdy3**: _Boolean_, force SPDY version 3 (Chrome only)

lib/mapping.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,9 @@ var options = {
386386
'priority': {
387387
name: 'priority',
388388
api: 'priority',
389-
param: 'string',
390-
info: 'change test priority'
389+
param: 'number',
390+
info: 'change test priority (0-9) [enforced by API key, otherwise 5]',
391+
valid: /^\d$/
391392
},
392393
// Undocumented/experimental/transitent/deprecated
393394
'noads': {

test/fixtures/command-line/help-test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
--tsview <id> test name to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb)
5555
--tsviewconfigs <string> configs to use when submitting results to tsviewdb (for private instances that have integrated with tsviewdb)
5656
--affinity <string> string to hash test to a specific test agent. tester will be picked by index among available testers
57-
--priority <string> change test priority
57+
--priority <number> change test priority (0-9) [enforced by API key, otherwise 5]
5858
--noads block ads defined by adblockrules.org
5959
--continuous capture video continuously (unstable/experimental, may cause tests to fail)
6060
--spdy3 force SPDY version 3 (Chrome only)

0 commit comments

Comments
 (0)