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

Fix detection of clang version and v14+ unit tests #1878

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

grembo
Copy link
Contributor

@grembo grembo commented Sep 4, 2023

Compiler version (__VERSION__) is always enclosed in quotes.
This only fixes version detection for clang to keep the scope small.
Stripping quotes could also be done globally in compiler.rs.

Compiler version (__VERSION__) is always enclosed in quotes.
This only fixes version detection for clang to keep the scope small.
Stripping quotes could also be done globally in compiler.rs.
@sylvestre
Copy link
Collaborator

would it be possible to have a test for this?

@grembo grembo mentioned this pull request Sep 4, 2023
@grembo
Copy link
Contributor Author

grembo commented Sep 4, 2023

would it be possible to have a test for this?

It's two things - the unit test code itself was broken. Once it was fixes (test/system.rs), the problematic behavior was exposed. We could have a basic unit test of course (not really hard to do). Not sure how much it buys us, but also won't hurt...

@grembo grembo force-pushed the fix-clang-version-check-and-tests branch from 43d8e94 to 5ee7c72 Compare September 4, 2023 20:36
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2023

Codecov Report

Patch coverage: 43.75% and project coverage change: +0.07% 🎉

Comparison is base (1ab4cff) 29.80% compared to head (d456957) 29.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1878      +/-   ##
==========================================
+ Coverage   29.80%   29.87%   +0.07%     
==========================================
  Files          49       49              
  Lines       17516    17528      +12     
  Branches     8423     8430       +7     
==========================================
+ Hits         5220     5237      +17     
+ Misses       7212     7211       -1     
+ Partials     5084     5080       -4     
Files Changed Coverage Δ
tests/system.rs 31.00% <0.00%> (ø)
src/compiler/clang.rs 53.75% <53.84%> (+0.21%) ⬆️

... and 9 files with indirect coverage changes

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

@grembo grembo force-pushed the fix-clang-version-check-and-tests branch from c2fb5d2 to d456957 Compare September 4, 2023 20:56
@@ -252,6 +252,38 @@ mod test {
}
}

#[test]
Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks

@sylvestre sylvestre merged commit 378c937 into mozilla:main Sep 5, 2023
38 of 39 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.

3 participants