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

Set font in tests #1428

Closed
wants to merge 1 commit into from
Closed

Set font in tests #1428

wants to merge 1 commit into from

Conversation

bynect
Copy link
Member

@bynect bynect commented Jan 1, 2025

This should fix #1404.

This is kind of an hack, but it should work for the fontconfig + pango problem.
Further testing is required

@codecov-commenter
Copy link

codecov-commenter commented Jan 1, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.28%. Comparing base (b7abe8f) to head (9a267f2).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1428      +/-   ##
==========================================
+ Coverage   65.19%   65.28%   +0.08%     
==========================================
  Files          50       50              
  Lines        8729     8737       +8     
  Branches     1034     1034              
==========================================
+ Hits         5691     5704      +13     
+ Misses       3038     3033       -5     
Flag Coverage Δ
unittests 65.28% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@bynect bynect requested review from fwsmit and zappolowski January 1, 2025 21:32
@fwsmit
Copy link
Member

fwsmit commented Jan 10, 2025

Can this not be solved by installing the font in the relevant docker images. I'm guessing the issue is that those images dont have a good font installed that can be picked up by pango

@bynect
Copy link
Member Author

bynect commented Jan 10, 2025

Can this not be solved by installing the font in the relevant docker images. I'm guessing the issue is that those images dont have a good font installed that can be picked up by pango

yes that's the problem. however automated test done downstream by various distros doesn't pull a font. this is more of an hack, but I don't know if they can add some soft dependency on fonts in their ci.

@bynect
Copy link
Member Author

bynect commented Jan 10, 2025

@dcermak @fossdd as distro packager does this solution seem right to you? or is a soft dependency on fonts better ?

@fwsmit
Copy link
Member

fwsmit commented Jan 12, 2025

A distro test system should be able to configure dependencies for software I would think. Do distros use the dunst test suite to test their packages?

@bynect
Copy link
Member Author

bynect commented Jan 12, 2025

A distro test system should be able to configure dependencies for software I would think. Do distros use the dunst test suite to test their packages?

Yes but the problem is that we introduced a test that fails when no font is present. So all the old packaging started failing when updating to v1.12

the automatic ci runs for the distros started failing because they did not explicitly add the font dependency

@fossdd
Copy link

fossdd commented Jan 12, 2025

For Alpine Linux it's totally fine to add a font to our test dependencies. Sounds easier to maintain than shipping a font in the tarball. It makes sense documenting this somewhere, like in HACKING.md.

@dcermak
Copy link
Contributor

dcermak commented Jan 13, 2025

I do agree with @fossdd, it's no problem to pull in a font as a build-time dependency, neither in Fedora nor in openSUSE. I would discourage bundling a font and instead document this requirement for the test suite

@bynect
Copy link
Member Author

bynect commented Jan 13, 2025

Ok let's do it that way then.
I'll close this proof of concept and add some lines to the dependencies documentation

@bynect bynect closed this Jan 13, 2025
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.

test_calculate_dimensions_height_min test fails
5 participants