Arquivos
rocm-systems/projects/rocprofiler-compute/coverage
jamessiddeley-amd fa860c5272 [rocprof-compute] Fixed CDash compute code coverage upload (#863)
* Test CDash upload fixes

* Test CDash upload fixes + rename

* fix run-ci.py script

* fix run-ci.py script

* fix run-ci.py script

* fix run-ci.py script

* fixed workflow

* renamed coverage file

* fixed run-ci.py script

* edited workflow file

* edited script desc

* Update Coverage.xml
2025-09-05 11:55:08 -04:00
..

Coverage Workflow for rocprofiler-compute in Monorepo

Overview

This document describes the coverage generation and CDash upload workflow for rocprofiler-compute within the super-repo structure.

Directory Structure

monorepo/
├── projects/
│   └── rocprofiler-compute/
│       ├── CMakeLists.txt
│       ├── coverage/
│       │   └── coverage-latest.xml  # committed coverage file
│       ├── utils/
│       │   ├── update_coverage.sh  # coverage generation/update script
│       │   └── run-ci.py             # CDash upload script
│       └── ...
└── .github/
    └── workflows/
        └── rocprofiler-compute-cdash.yml  # gitHub Action for auto-upload

Workflows

1. Manual Coverage Generation (Periodic Update)

Run this periodically to update the coverage baseline:

# From monorepo root
cd projects/rocprofiler-compute
./utils/update_coverage.sh

# This will:
# - Build with coverage enabled
# - Run all tests
# - Generate coverage.xml
# - Copy/overwrite to coverage/coverage-latest.xml
# - Show instructions for committing

2. Commit Coverage to Repository

# From monorepo root
git add projects/rocprofiler-compute/coverage/coverage-latest.xml
git commit -m "rocprofiler-compute: Update coverage to XX.X% line coverage"
git push origin develop

3. Automatic CDash Upload

When coverage/coverage-latest.xml is pushed to develop branch:

  • GitHub Action triggers automatically
  • Uploads coverage to CDash
  • Posts summary to GitHub Actions

CDash Project

View results at: https://my.cdash.org/index.php?project=rocprofiler-compute

Maintenance

Troubleshooting

Coverage Generation Fails

#check Python dependencies
pip install coverage pytest pytest-cov

#verify tests can run
cd projects/rocprofiler-compute/build
ctest --verbose