mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 20:55:39 +00:00
6121dea7c8
symbolstore.py processes filenames in FILE lines of symbol files to encode information about the source repository they came from, or to mark known generated source files. It also reads the dist/include install manifest so it can map header files from there back to their source locations. These mappings were broken on Windows because symbolstore.py first passes filenames into `FixFilenameCase`, which calls `GetFinalPathNameByHandleW`, which breaks things in two ways: 1) It returns paths with an uppercase drive letter, and source paths from elsewhere have a lowercase drive letter. 2) It resolves symlinks, and on Taskcluster Windows builds the whole build is done within a symlinked directory so paths directly from the srcdir and objdir won't match those canonicalized paths. This patch adds a `normpath` function to symbolstore.py and moves the contents of `FixFilenameCase` into it on Windows, and just makes it an alias for `os.path.normpath` everywhere else. It then uses it everywhere we deal with paths that will be compared against source file paths from symbol files so that all paths are canonicalized the same and we can do simple string matching from there. Additionally, this patch adds a check to the functional test to verify that header files from dist/include are correctly mapped to the source repository. Unfortunately there is still not a test for generated files because they only appear in the libxul symbol file, and dumping symbols from libxul is too slow to invoke as part of a unit test. MozReview-Commit-ID: Dx3z1BZcIvc --HG-- extra : rebase_source : 80179bbea58a804344a56ef27f438ada76e7fe77 |
||
---|---|---|
.. | ||
win32 | ||
python.ini | ||
symbolstore.py | ||
unit-symbolstore.py | ||
upload_symbols.py |