Opting-in to mandatory coverage tests

102 views
Skip to first unread message

Ian Clelland

unread,
Dec 19, 2023, 2:17:53 PM12/19/23
to code-c...@chromium.org
Hey folks,

https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/code_coverage_in_gerrit.md#cls-blocked-due-to-low-coverage tells me that "For some teams in Chrome, we have turned on a coverage check, which blocks a CL from submission if the incremental coverage is below a preset threshold"

How does one become such a team? What's the scope of those checks? (directory-scoped? fle-scoped? something else?) I'd like to be able to have coverage enforced on commits in several directories that I'm OWNER in, or that our team manages, but I can't find docs on how that's enabled.

Thanks for any pointers,
Ian

Jeremy Bettis

unread,
Dec 19, 2023, 2:38:23 PM12/19/23
to Ian Clelland, code-c...@chromium.org

--
You received this message because you are subscribed to the Google Groups "code-coverage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to code-coverag...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/code-coverage/CAK_TSXL5%3Dnk1FnGCd0Qr4hMQhRs1eOAgAuaeU-gdgjWTaHAjFA%40mail.gmail.com.


--
Jeremy Bettis | ChromeOS FAFT lead | jbe...@google.com | 303-257-2486

Ian Clelland

unread,
Dec 20, 2023, 8:18:24 AM12/20/23
to Jeremy Bettis, code-c...@chromium.org
Thanks, Jeremy -- that sounds like the setting is per-project (e.g., all of Chromium,) and not per-directory, so that would be a much larger change than I'm looking to make (at least right now).

Prakhar Asthana

unread,
Jan 4, 2024, 10:30:23 AM1/4/24
to Ian Clelland, Jeremy Bettis, code-c...@chromium.org
If your code is restricted to chromium/src, then all you need is to drop as a ping/email with the list of directories that you want this check enabled for. We would then create a config in code coverage backend for the same. See FAQ doc

Alexei Svitkine

unread,
Jan 11, 2024, 11:01:22 AM1/11/24
to code-coverage, Prakhar Asthana, Jeremy Bettis, code-c...@chromium.org, Ian Clelland
Hi, I'm wondering if the error message and docs could be expanded with instructions on how to actually see the coverage data corresponding to the CL that was analyzed? Otherwise, it's not very actionable if people don't know what coverage is missing and would be tempted to just add the tag to bypass the check, instead of adding coverage.

Alexei Svitkine

unread,
Jan 11, 2024, 11:03:37 AM1/11/24
to code-coverage, Alexei Svitkine, Prakhar Asthana, Jeremy Bettis, code-c...@chromium.org, Ian Clelland
I see it's actually shown via background color on line numbers in the diff. Can the messages say that explicitly? 

Prakhar Asthana

unread,
Jan 11, 2024, 3:41:36 PM1/11/24
to Alexei Svitkine, code-coverage, Jeremy Bettis, Ian Clelland
Raised CL to fix this.

Alexei Svitkine

unread,
Jan 11, 2024, 3:43:57 PM1/11/24
to Prakhar Asthana, code-coverage, Jeremy Bettis, Ian Clelland
Thanks!
Reply all
Reply to author
Forward
0 new messages