Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test for CPU feature detection #1186

Merged
merged 9 commits into from
Jan 31, 2025
Merged

Conversation

graebm
Copy link
Contributor

@graebm graebm commented Jan 28, 2025

Issue:
I accidentally committed broken CPU-feature-detection code in #1182 (fixed the next day by #1184)

This kind of accident slipped through because I was in a rush, and we don't have unit tests to double-check this particular code. Unit tests for feature detection are hard because these features vary wildly machine to machine.

Description of changes:
Add an integration test that checks CPU-feature-detection against linux's easy-to-parse /proc/cpuinfo.

This test is skipped on platforms like Windows and Apple where there's no simple way to query CPU features

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.27%. Comparing base (0e7637f) to head (4596003).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1186   +/-   ##
=======================================
  Coverage   84.27%   84.27%           
=======================================
  Files          57       57           
  Lines        5976     5976           
=======================================
  Hits         5036     5036           
  Misses        940      940           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@graebm graebm enabled auto-merge (squash) January 30, 2025 23:38
@graebm graebm merged commit bfa6c85 into main Jan 31, 2025
56 checks passed
@graebm graebm deleted the cpu-feature-integ-test branch January 31, 2025 00:01
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.

3 participants