GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Publish C-level coverage of the CPython test suite · Issue #94759 · python/cpython

Publish C-level coverage of the CPython test suite #94759

New issue
Copy link
New issue
Copy link
Open
Open
Publish C-level coverage of the CPython test suite#94759
Copy link
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement

Description

@mdboom
mdboom
opened on Jul 11, 2022
Issue body actions

Feature or enhancement

Automatically publish C-level coverage of the CPython test suite.

Pitch

Recent issues, such as the problems with frame.setlineno, have revealed that the C-level coverage of the test suite isn't perfect. While source-level coverage isn't the only metric of a good test suite, paying closer attention to it should help us have more confidence when making changes to the CPython core.

Proposed design for MVP

  • Publish results nightly: This cadence should be enough for most cases. While various tools like codecov.io can run on every pull request, coverage takes a long time to run, and IME, there is enough noise in the results that developers (especially new to the project) would spend a lot of time "chasing" coverage.
  • Use clang/llvm-cov rather than gcc/gcov: As @erlend-aasland pointed out the LLVM toolchain coverage provides branch counts and coverage of subexpressions which seems pretty useful. There is a risk that this isn't the same tooling as most Linux developers would use, and not what make coverage-report does.
  • Publish to Github Pages: The easiest thing seems to be to publish to Github Pages in a new repository in the python org for this purpose. This keeps all of the credential management within Github.

Out of scope

Creating diffs between coverage runs seems like it would be useful, but I haven't found a good tool for that yet.

Python-level coverage reports would likewise be useful, but should be a follow-on to this.

Previous discussion

@brettcannon had set up coverage reports in the past, but they have been broken for a couple of releases. This aims to be simpler than that approach by using a pure Github stack (not using codecov.io) and would just run nightly, not as part of every pull request.

More recent discussion began here: faster-cpython/ideas#426

  • PR: gh-94759: Collect C-level coverage using llvm-cov #94760
Reacted by Gregory P. Smith, Erlend E. Aasland, Kumar Aditya and Bartosz Sławecki

Activity

  1. mdboom
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jul 11, 2022
  2. mdboom
    changed the title [-]Public C-level coverage of the CPython test suite[/-] [+]Publish C-level coverage of the CPython test suite[/+] on Jul 11, 2022
  3. AlexWaygood
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    on Jul 11, 2022
  4. tiran
    added 2 commits that reference this issue on Jul 12, 2022

    pythongh-94759: Create LCOV report with branch coverage

    f87ac08

    gh-94759: Create LCOV report with branch coverage (GH-94793)

    f5c02af
  5. miss-islington
    added 2 commits that reference this issue on Jul 13, 2022

    pythongh-94759: Create LCOV report with branch coverage (pythonGH-94793)

    556f685

    gh-94759: Create LCOV report with branch coverage (GH-94793)

    f44a9dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirTests in the Lib/test dirtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.