Repository navigation
Fix fonts test path and cover more cases in testFontStripping - #5788
Open
janinadavydova wants to merge 2 commits into
Open
janinadavydova wants to merge 2 commits into
janinadavydova wants to merge 2 commits into
Conversation
janinadavydova
force-pushed
the
davydova/fix-fonts-test-path-and-add-cases
branch
from
November 3, 2026 22:40
a6812a4 to
7e8418c
Compare
Alexander Maryanovsky (m-sasha)
left a comment
Contributor
There was a problem hiding this comment.
Good catch on the wrong directory, thanks!
| } | ||
|
|
||
| @ParameterizedTest(name = "stripJreFonts={0}") | ||
| @EnumSource(TriBool::class) |
Contributor
There was a problem hiding this comment.
Each test here is pretty lengthy, and there's no real need to verify all 3 options.
Especially not the "default", as that just verifies a very simple thing: the default value of stripJreFonts.
To make sure there's no false positive (such as looking at the wrong directory) it's better to make sure the directory exists in the JDK from which we're creating the runtime. If that's hard to do, then the test itself should execute the build twice.
Comment on lines
+387
to
+390
| assertTrue( | ||
| fontsDir.walkTopDown().any { it.isFile && it.extension in setOf("ttf", "otf") }, | ||
| "JBR fonts should remain when stripJreFonts is false" | ||
| ) |
Contributor
There was a problem hiding this comment.
No need to look for the fonts themselves. Just checking the directory exists is enough.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe proposed changes and the issue being fixed
https://github.com/JetBrains/compose-multiplatform/blob/master/gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/tests/integration/DesktopApplicationTest.kt#L376
Here it checks
runtime/fonts, but bundled JRE fonts are located inruntime/lib/fontsand the assertion could pass even when fonts remain(Optional) Follow up to CMP-10772 Strip JRE fonts from desktop distributable
Testing
N/A
Release Notes
N/A