-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable scoverage on the test suite #25009
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
base: main
Are you sure you want to change the base?
Conversation
4540582 to
6d6c454
Compare
6577a5c to
1b9f906
Compare
|
@smarter this PR is mature enough so could you please review it? It would be good to focus on merging this PR with the support of scoverage on a basic test surface (pos tests, run tests and a few others) before expanding the test surface or addressing the failing issues. Here's a brief description of changes:
|
|
@anatoliykmetyuk can you rebase? it seems there are conflicts. |
tgodzik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions and minor comments from me. We also need to rebase
| val fileMatches = sourceFiles.exists(matchesIgnoreList) | ||
|
|
||
| // Also check the basename of the test title (covers SeparateCompilationSource directory targets) | ||
| val titleMatches = ignoreList.contains(new java.io.File(target.title).getName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we beed this? Which files in the exclude list are handled by this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The titleMatches check is needed for directory tests where source files are in nested subdirectories. For example, i15845 contains only a config/ subdirectory (no direct .scala files), so SeparateCompilationSource.sourceFiles returns an empty array. Since there are no files to iterate, fileMatches (including parentMatch) is always false. Only titleMatches catches these by extracting the directory name from the test title.
Concrete examples from the excludelist that rely on titleMatches:
… logic - Introduced `CoverageSupport` trait to handle coverage file verification and instrumentation. - Updated `BootstrappedOnlyCompilationTests` and `CompilationTests` to utilize coverage instrumentation when running tests. - Refactored test execution logic to conditionally check for coverage based on the `Properties.testsInstrumentCoverage` flag. - runMacros, runWithCompiler, runBootstrappedOnly, genericJavaSignatures support coverage testing
Co-authored-by: Tomasz Godzik <tgodzik@users.noreply.github.com>
Co-authored-by: Tomasz Godzik <tgodzik@users.noreply.github.com>
Co-authored-by: Tomasz Godzik <tgodzik@users.noreply.github.com>
Co-authored-by: Tomasz Godzik <tgodzik@users.noreply.github.com>
7a73231 to
e515b75
Compare
|
@tgodzik thank you for the review! I've addressed the review and rebased to the latest main. The CI failures appear to be flaky tests not related to this PR. |
This PR enables scoverage phase on the compiler tests. The purpose is to check if the compiler crashes with this flag enabled on some of the tests.
The implementation proposed in this PR runs
postests with the scoverage flag in a separate CI job. Currently, with this flag enabled, 26 tests fail. The exact checks executed by the test:Further work:
neg,run, standard library.cc @smarter