If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Can't find OnboardingTourType.jsm when rewriting lcov files

RESOLVED FIXED in Firefox 56

Status

Testing
Code Coverage
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: marco, Assigned: marco)

Tracking

(Blocks: 1 bug)

Version 3
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

3 months ago
Traceback (most recent call last):
  File "python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py", line 731, in <module>
    main()
  File "python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py", line 728, in main
    rewriter.rewrite_file(f, args.output_suffix)
  File "python/mozbuild/mozbuild/codecoverage/lcov_rewriter.py", line 675, in rewrite_file
    assert os.path.isfile(source_file), "Couldn\'t find mapped source file at %s!" % source_file
AssertionError: Couldn\'t find mapped source file at /home/marco/Documenti/FD/mozilla-unified/browser/extensions/onboarding/content/modules/OnboardingTourType.jsm!

The SF entry is "resource://onboarding/modules/OnboardingTourType.jsm".

The module can be found at "browser/extensions/onboarding/OnboardingTourType.jsm".
(Assignee)

Comment 1

3 months ago
This is causing the rewriting to fail, as this SF is in a lot of lcov files.

Chris, can you take a look?
Flags: needinfo?(cmanchester)
(Assignee)

Comment 2

3 months ago
Created attachment 8885232 [details]
1499742942-8792-0.info.bz2

This is an example lcov file containing OnboardingTourType.jsm.
(Assignee)

Comment 3

3 months ago
In the chrome-map.json file we have these entries:

"resource://onboarding/": [
      "dist/bin/browser/features/onboarding@mozilla.org/chrome/content"

and:

"dist/bin/browser/features/onboarding@mozilla.org/chrome/content/": [
      "/home/marco/Documenti/FD/mozilla-unified/browser/extensions/onboarding/content/*",
(Assignee)

Comment 4

3 months ago
There's also:

"dist/bin/browser/features/onboarding@mozilla.org/chrome/content/modules/": [
      "/home/marco/Documenti/FD/mozilla-unified/browser/extensions/onboarding/*.jsm",

I suppose the rewriter should have used this entry instead of the one from comment 3.
(Assignee)

Comment 5

3 months ago
Created attachment 8885281 [details] [diff] [review]
Patch

Using the longest prefix match in _find_install_prefix fixes the issue. Do you believe it could cause other issues to crop up?
Assignee: nobody → mcastelluccio
Status: NEW → ASSIGNED
Attachment #8885281 - Flags: review?(cmanchester)
(Assignee)

Updated

3 months ago
Blocks: 1189360
Comment on attachment 8885281 [details] [diff] [review]
Patch

Review of attachment 8885281 [details] [diff] [review]:
-----------------------------------------------------------------

This makes sense and looks like it will work for now. I guess this could still be an issue if we end up with a jar.mn with something like:

content/modules/ (*.jsm)
content/modules/ (foo/*.jsm)

in this case I think we'd only be able to tell which line was responsible for installing the file by trying each pattern, but I'm not sure that's a concern in practice.
Attachment #8885281 - Flags: review?(cmanchester) → review+
Flags: needinfo?(cmanchester)

Comment 7

3 months ago
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b5eec74e7e5
Use longest prefix match when rewriting lcov entries. r=chmanchester

Comment 8

3 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3b5eec74e7e5
Status: ASSIGNED → RESOLVED
Last Resolved: 3 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(Assignee)

Comment 9

2 months ago
This is happening again, I need to figure out why.
(Assignee)

Comment 10

2 months ago
Apparently it's happened again because a task was triggered for an old revision of mozilla-central. So it's actually fine.
You need to log in before you can comment on or make changes to this bug.