Skip to content

Conversation

@luadebug
Copy link
Contributor

@luadebug luadebug commented Dec 22, 2025

Looking for somewhat coverage test on linux and to be integrated to CI further on.

      - name: Install lcov
        run: |
          sudo apt update
          sudo apt-get install lcov
          
      - uses: coverallsapp/github-action@master
        with:
          path-to-lcov: ./build/clang-coverage-lcov/coverage/coverage.fixed.lcov
          github-token: ${{ secrets.GITHUB_TOKEN }}

To run coverage build NO_AVX=1 ./scripts/run_clang_coverage.sh build/clang-coverage-lcov and go web-browser to
file:///home/admin/omath/build/clang-coverage-lcov/coverage/lcov-html/source/coverage/index.html

image

@luadebug luadebug marked this pull request as draft December 22, 2025 05:22
@luadebug luadebug force-pushed the try branch 8 times, most recently from f7f3d20 to 40045f2 Compare December 22, 2025 17:26
@luadebug luadebug marked this pull request as ready for review December 22, 2025 17:28
@@ -0,0 +1,54 @@
#include <gtest/gtest.h>
#include "../../source/coverage/coverage_wrappers.hpp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use absolute path instead

Copy link
Owner

@orange-cpp orange-cpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need fo fix some stuff

@@ -0,0 +1,14 @@
#include <gtest/gtest.h>
#include "../../source/coverage/coverage_wrappers.hpp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use absolute path instead

@@ -0,0 +1,62 @@
#include <gtest/gtest.h>
#include "../../source/coverage/coverage_wrappers.hpp"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use absolute path instead

@@ -0,0 +1,12 @@
#include <gtest/gtest.h>
#include "../../source/coverage/coverage_wrappers.hpp"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use absolute path instead

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive code coverage infrastructure for the project, integrating Clang-based coverage reporting with CI/CD and introducing extensive test coverage improvements.

Key Changes:

  • Implements Clang/LLVM coverage tooling with HTML and LCOV output generation
  • Adds coverage coalescer tool to merge duplicate coverage entries from header-only code
  • Introduces 50+ new test files covering linear algebra, collision detection, pattern scanning, and utility components
  • Integrates coverage reporting into GitHub Actions CI for x64-linux builds

Reviewed changes

Copilot reviewed 53 out of 74 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/coverage_coalescer.cpp New tool to merge duplicate coverage entries from header files
scripts/run_clang_coverage.sh Shell script orchestrating Clang coverage build and report generation
cmake/Coverage.cmake CMake module configuring coverage flags and targets
tests/general/*.cpp 30+ new test files adding coverage for vectors, matrices, collision, pattern scanning
source/coverage/*.cpp Helper files forcing template instantiation for coverage attribution
.github/workflows/cmake-multi-platform.yml CI integration running coverage on x64-linux and uploading to Coveralls
include/omath/utility/pattern_scan.hpp Fixed off-by-one error in pattern scanning loop
include/omath/utility/color.hpp Fixed unreachable code in formatter
CMakeLists.txt Added OMATH_ENABLE_COVERAGE option and coverage configuration
Comments suppressed due to low confidence (2)

tools/coverage_coalescer.cpp:1

  • Using #include <bits/stdc++.h> is a non-standard GCC internal header that includes the entire C++ standard library. This is not portable and significantly increases compilation time. Replace with specific standard headers needed (e.g., <iostream>, <fstream>, <vector>, <string>, <map>, <unordered_map>, <sstream>, <algorithm>).
    tests/general/unit_test_color.cpp:1
  • The test fixture class is named unit_test_color which does not follow typical naming conventions for test fixtures. Consider renaming to UnitTestColor or ColorTest to match standard C++ naming conventions for classes and align with other test fixtures in the codebase like UnitTestColorGrouped.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@orange-cpp orange-cpp changed the base branch from main to temp December 22, 2025 22:23
@orange-cpp orange-cpp merged commit 3432162 into orange-cpp:temp Dec 22, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants