Closed Bug 1473541 Opened 6 years ago Closed 6 years ago

Use the fetch-content script to download grcov for running test suites

Categories

(Testing :: Code Coverage, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gabriel-v, Assigned: ahal)

References

Details

Use the taskcluster/scripts/misc/fetch-content script to download the grcov artifact, instead of using "self.download_file" and "tarfile.extractall" in testing/mozharness/mozharness/mozilla/testing/codecoverage.py.

That script has to be pulled from python/mozbuild/mozbuild/action/test_archive.py
For Windows, python3 should be at c:\mozilla-build\python3\python.exe.
I'm making a few changes to 'fetches' in bug 1468812, though the 'fetch-content' script won't change much so it should be tangential. Figured it was worth mentioning though.
See Also: → 1468812
(In reply to Andrew Halberstadt [:ahal] from comment #2)
> I'm making a few changes to 'fetches' in bug 1468812, though the
> 'fetch-content' script won't change much so it should be tangential. Figured
> it was worth mentioning though.

Thanks for mentioning it. Could you look at these patches to see if your changes are incompatible with the hacks I made to use "fetches" for "test" tasks? https://reviewboard.mozilla.org/r/255000/diff/1#index_header
There will be a few minor conflicts, but shouldn't be hard to resolve. I actually wrote a similar patch (that I was planning to finish up after the one in bug 1468812 lands):
https://hg.mozilla.org/try/rev/d77de0cbb522668bfa8894dabd12313e3ecd0c30

I do want to start using 'fetch-content' in all test/mozharness based tasks though. So if you are inclined, it would be nice if that could live in a more generic place than codecoverage.py. But again, this is something I could change later.

If this is low priority, it might be easier to wait for me to solve this generically. But if you need it landed soonish or the patches are ready to go then feel free to land and I can rebase on top.
Summary: Use the fetch-content script to download grcov, instead of downloading the file directly → Use the fetch-content script to download grcov for running test suites
See Also: → 1474575
This is partly done with https://hg.mozilla.org/integration/autoland/rev/bc10207e894d. Linux is going through the first branch (https://hg.mozilla.org/integration/autoland/rev/bc10207e894d#l2.22) which is what we want, Windows isn't yet (and we haven't checked Mac).
Depends on: 1468812
See Also: 1468812
Depends on: 1436037
Status: NEW → ASSIGNED
This will be fixed by :ahal through this patch [1] for this bug [2].

[1]: https://phabricator.services.mozilla.com/D3651
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1482344
Depends on: 1482344
Note: I haven't verified that fetch-content is being used for all ccov tasks in that patch. I know there is at least one worker-type (releng-hardware) where fetch-content doesn't yet exist. There may be others. In that case the manual downloading will still be used and you'll see the string "fetch-content script not found, downloading manually".

That patch does assume python 3 is available however (which I believe all the dependent bugs got fixed). I don't see any py3 failures in my try run:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=aa78b8866b39da7aaf9fc3d45df8195dd66975c4&filter-tier=1&filter-tier=2&filter-tier=3
(In reply to Andrew Halberstadt [:ahal] from comment #8)
> Note: I haven't verified that fetch-content is being used for all ccov tasks
> in that patch. I know there is at least one worker-type (releng-hardware)
> where fetch-content doesn't yet exist. There may be others. In that case the
> manual downloading will still be used and you'll see the string
> "fetch-content script not found, downloading manually".

There's one more coverage platform: macos. Since it's disabled, fixing it will probably be a follow up part of bug 1399394.

I confirm that your patch works in my own try push.

Passing this bug over to you. Thanks!
Assignee: tvijiala → ahal
See Also: → 1399394
I've filed bug 1490247 for Mac.
And I guess we can mark this as FIXED now.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.