Closed Bug 1373395 Opened 3 years ago Closed 2 years ago

Upload chrome-map.json as an artifact during code coverage builds

Categories

(Testing :: Code Coverage, defect)

53 Branch
defect
Not set

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: marco, Assigned: chmanchester)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This is needed to rewrite the lcov info files generated by the JS engine (bug 1224691).
Component: JavaScript Engine → Code Coverage
Product: Core → Testing
Chris, do you think you can take this?
I'm currently doing it as part of my coverage parsing task, but this means it has to clone mozilla-central and build. If the chrome-map was available for download as an artifact, I could completely avoid cloning and building.
Flags: needinfo?(cmanchester)
Sure, although keep in mind the rewriter is using mozbuild code, so you may still need a clone.
Assignee: nobody → cmanchester
Flags: needinfo?(cmanchester)
(In reply to Chris Manchester (:chmanchester) from comment #2)
> Sure, although keep in mind the rewriter is using mozbuild code, so you may
> still need a clone.

Thanks!
Yes, I was wrong, I will still need to clone, but I won't need to build (which is nice both because I can save some time and because I can make the task more reliable by avoiding the artifacts download which often fails).
Ok, I have this going on try here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2111b8fa706f1eda7de7629f933e6fd41bab6e6d

This puts the mapping file in the main code coverage archive, will that work for you, Marco?
(In reply to Chris Manchester (:chmanchester) from comment #4)
> Ok, I have this going on try here:
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=2111b8fa706f1eda7de7629f933e6fd41bab6e6d
> 
> This puts the mapping file in the main code coverage archive, will that work
> for you, Marco?

The coverage task is no longer downloading that file, as we are parsing the gcno files on the test machines (since bug 1367763).
Could you make it a separate artifact?
Comment on attachment 8909455 [details]
Bug 1373395 - Upload chrome-map.json during code coverage builds.

https://reviewboard.mozilla.org/r/180950/#review186760

::: toolkit/mozapps/installer/upload-files.mk:423
(Diff revision 1)
>  
>  
>  ifdef MOZ_CODE_COVERAGE
>    UPLOAD_FILES += \
> -    $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip)
> +    $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CODE_COVERAGE_ARCHIVE_BASENAME).zip) \
> +    $(call QUOTED_WILDCARD,$(topobjdir)/chrome-map.json)

We should probably end this with a \ and have $(NULL) as the last element so adding new ones makes a cleaner diff. (I should've made a similar comment when reviewing the setup.exe block above).
Attachment #8909455 - Flags: review?(mshal) → review+
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb6711fd3694
Upload chrome-map.json during code coverage builds. r=mshal
https://hg.mozilla.org/mozilla-central/rev/cb6711fd3694
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Blocks: 1402539
Thanks Chris! The only problem now is that the mapping contains absolute paths, which means the lcov rewriter will not be able to open the files if the source is on a different path. I filed bug 1402539 to fix this.
You need to log in before you can comment on or make changes to this bug.