Closed Bug 1624046 Opened 4 years ago Closed 4 years ago

"mach puppeteer-test --write-results" adds white-space after closing brackets

Categories

(Remote Protocol :: Agent, defect, P3)

defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: whimboo, Assigned: jgraham)

References

Details

Attachments

(3 files)

I was using mach puppeteer-test --write-results today to update the file puppeteer-expected.json file. Checking the diff I can see a lot of additionally added blanks after each closing bracket:

-  ],
+  ], 
   "Firefox Browser Page Frame.waitForSelector should work with removed MutationObserver": [
     "FAIL"

James is that a regression? The currently checked-in version doesn't have those blanks.

Flags: needinfo?(james)

Also tests are written in different orders to that file which makes diff basically useless. :/ Is it expected that we write the exact order of tests as run by Puppeteer?

The whitespace comes from Python. To make the order consistent we're going to need to either change the data structure to a list or otherwise use an ordereddict or something to ensure that things get written in the right order.

Flags: needinfo?(james)
Assignee: nobody → james
Status: NEW → ASSIGNED
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/ab2525a1da3b
Fix the ordering of puppeteer expected data, r=remote-protocol-reviewers,maja_zf
https://hg.mozilla.org/integration/autoland/rev/dbabf2e388fa
Always write results with --write-results, r=remote-protocol-reviewers,maja_zf
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

Oh, we should have updated the puppeteer-expected.json file when these patches landed. I will do it via bug 1607560 now.

Attachment #9135612 - Attachment description: Bug 1624046 - [remote] Fix puppeteer-expected.json for alphabetical order. → Bug 1624046 - [remote] Update puppeteer-expected.json for alphabetical order.

It's insertion order, not alphabetical.

Attachment #9135612 - Attachment description: Bug 1624046 - [remote] Update puppeteer-expected.json for alphabetical order. → Bug 1624046 - [remote] Update puppeteer-expected.json for insertion order.
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bac37288ded
[remote] Update puppeteer-expected.json for insertion order. r=remote-protocol-reviewers,jgraham
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: