Page MenuHomePhabricator

Tweaks to genTest option in parse.js
Closed, DeclinedPublic

Description

genTest option can be tweaked a bit further

  • Use wiki prefix to compute output directory name
  • Harden filename computation wrt outputDirectory CLI and presence/absence of trailing /
  • Harden filename computation against chars that might not be easy to use on a filesystem

Take a look at bin/langconv-tests.js and the computation of nocksFile in the nocksWrap function for inspiration which uses path.resolve and url encode to address options 2 & 3.

Event Timeline

ssastry created this task.Dec 4 2018, 11:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 4 2018, 11:39 PM
ssastry triaged this task as Low priority.Dec 4 2018, 11:39 PM
ssastry moved this task from Backlog to Prototype / Evaluation on the Parsoid-PHP board.
ssastry reassigned this task from Sbailey to Arlolra.Mar 7 2019, 8:49 PM
ssastry added a subscriber: Sbailey.

Bonus points: sync file generation and options between transformTests and domTests .... i.e. both should probably take a common output directory flag and compute the file name from other options (prefix, page, transformer name).

Change 495052 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Strengthen and unify genTest options

https://gerrit.wikimedia.org/r/495052

Change 495052 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Strengthen and unify genTest options

https://gerrit.wikimedia.org/r/495052

Change 495052 abandoned by Arlolra:
Strengthen and unify genTest options

Reason:
Meh

https://gerrit.wikimedia.org/r/495052

Arlolra removed Arlolra as the assignee of this task.Apr 29 2019, 10:37 PM
Arlolra added a subscriber: Arlolra.
ssastry closed this task as Declined.May 2 2019, 4:36 AM

Once porting is done, we are unlikely to use this test mode much. And given hybrid testing is working fairly well, this testing mode doesn't have as much utility as it did in the early days of porting. We can revisit this if this testing mode has utility post-porting.