Closed Bug 1584452 Opened 2 years ago Closed 2 years ago

Use only paths relative to the repository in chrome-map.json

Categories

(Testing :: Code Coverage, defect)

defect
Not set
normal

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: bastien, Assigned: bastien)

References

Details

Attachments

(1 file)

I'm working on the code-coverage web platform with Marco.

We use the aggregated lcov output from *-ccov tasks, built from chrome-map.json, jsvm output and lcov_rewriter.
Our own task check that all files from that output are available in a local mozilla-central clone

We have 2 issues with the current chrome-map.json output:

  1. Some files are prefixed by obj-firefox/$SRCDIR, due to a misuse of mozpath.relpath (issue on our repo)
  2. Some files have absolute paths, generally using /builds/worker/workspace/build/tests/ that do not match directly a file in the repo (issue on our repo)

I made a naive patch for the first issue, removing $SRCDIR from the paths in generate_pp_info.
A try run on that patch gives a better chrome-map.json

I'm not familiar enough with the chrome-map build to know if this is the right approach, or if I should patch directly the lcov_rewriter.
Chris, could you give me your input here ? Thanks !

Flags: needinfo?(cmanchester)
See Also: → 1522304

Hmm, I think we fell out of date with respect to a pre-processor change in bug 1528892. I haven't looked too closely at your patch but what you're proposing sounds reasonable.

Curiously the raw srcdir seems to appear mostly at the start of files under _tests, probably due to the full path here: https://searchfox.org/mozilla-central/rev/23f836a71cfe961373c8bd0d0219ec60a64b3c8f/python/mozbuild/mozbuild/codecoverage/chrome_map.py#96 not being what we expect for files under _tests, although it's not clear why.

Flags: needinfo?(cmanchester)
Pushed by babadie@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ef1337991836
Remove $SRCDIR prefix in chrome map generation, r=chmanchester
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → bastien
You need to log in before you can comment on or make changes to this bug.