Skip to content

Fix separate compilation tests failing under coverage - #25604

Merged
SolalPirelli merged 2 commits into
scala:mainfrom
anatoliykmetyuk:fix-capture-failing-tests
Apr 8, 2026
Merged

SolalPirelli merged 2 commits into
scala:mainfrom
anatoliykmetyuk:fix-capture-failing-tests

Conversation

@anatoliykmetyuk

Copy link
Copy Markdown
Contributor

Enable a few previously excluded scoverage tests. Some tests are compiled with older compilers to test backward compat. Those compilers do not support the scoverage flag, hence failing. The solution in this PR ensures the scoverage flag is not passed to those older compilers.

How much have you relied on LLM-based tools in this contribution?

Moderately

How was the solution tested?

Tests excluded from the excludelist pass locally. Coverage suite also passes locally.

@anatoliykmetyuk
anatoliykmetyuk marked this pull request as ready for review March 24, 2026 07:08
@anatoliykmetyuk

Copy link
Copy Markdown
Contributor Author

CI failures appear to be unrelated to the issue - main currently fails CI as well. Will rebase once main is green.

@som-snytt

som-snytt commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

I touched something about legacy compiler and coverage.

#25452

I'm not sure offhand what is optimal.

Oh I remember I was confused because coverage is passed in as an option? So from the perspective of a test, I have no idea (by construction) whether coverage was requested.

I guess just stripping it out is the best one can do.

I'm used to test parameters being something I can see in the test code. Sometimes (like benchmark) the params are dynamic.

Edit: I guess I already commented to exclude all legacy tests from coverage...

#25452 (comment)

@anatoliykmetyuk
anatoliykmetyuk force-pushed the fix-capture-failing-tests branch from f9651c3 to 784586d Compare March 25, 2026 01:48
@anatoliykmetyuk

Copy link
Copy Markdown
Contributor Author

Edit: I guess I already commented to exclude all legacy tests from coverage...

That could also be a solution. However, such a solution would exclude coverage data from those steps of such tests that deal with the current compiler. So I believe stripping the coverage flags based on the individual compiler versions requested is a more precise solution.

@SolalPirelli
SolalPirelli enabled auto-merge (squash) April 8, 2026 08:24
@SolalPirelli
SolalPirelli merged commit df7d876 into scala:main Apr 8, 2026
64 checks passed
@anatoliykmetyuk
anatoliykmetyuk deleted the fix-capture-failing-tests branch April 9, 2026 00:23
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