Closed Bug 1764609 Opened 3 years ago Closed 2 years ago

[perfdocs] Resolve all issues with running PerfDocs on Windows machines

Categories

(Testing :: Performance, defect, P2)

defect

Tracking

(firefox106 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: sparky, Assigned: sparky)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

There are currently a large number of issues with running perfdocs on Windows and we'll need to fix them in this bug.

See comment #6 here from :calixte: https://bugzilla.mozilla.org/show_bug.cgi?id=1739406#c6

I ran ./mach lint -l perfdocs in the windows moz-shell and it was a bad idea:

    * there are some encoding issue when reading the files;
    * then the directory: https://searchfox.org/mozilla-central/rev/d34f9713ae128a3138c2b70d8041a535f1049d19/tools/lint/perfdocs/utils.py#92 is not existing in my setup;
    * I get then other encoding issues easily fixed,
    * at the end it works but the resulting diff is unusable:
        * / are replaced with some \
        * eol are wrong
        * some encoding issues.
See Also: → 1764632
Depends on: 1748914
Assignee: nobody → gmierz2
Status: NEW → ASSIGNED

The patch I attached is nearly complete. Two things are missing:
(1) Fix unit tests to run on windows.
(2) Fix warning generation on windows (path matching is a bit off still).

Everything else works, and if a user applies this patch and runs ./mach lint -l perfdocs . --warnings --outgoing --fix it'll fix the docs in the same way as it's done on linux with the same formatting.

This patch fixes the path issues with PerfDocs on Windows machines. To do this, all os path manipulations were converted to use pathlib. The encoding, and permissions of the files are also set properly now since Windows has different defaults. The tests were also fixed to be able to run on Windows machines.

Attachment #9292700 - Attachment is obsolete: true
Pushed by gmierz2@outlook.com: https://hg.mozilla.org/integration/autoland/rev/4a34faed7dce Use pathlib in perfdocs, and utf-8 encoding. r=perftest-reviewers,kshampur
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: