Fix inconsistent test output in MSYS2 and WSL#154
Open
rory-cd wants to merge 1 commit into
Open
Conversation
Fixes minor inconsistencies in test output for MSYS2 and WSL. Minor cross-platform fixes were also added to aid testing. - Animation: Added frame rate cap to avoid MSYS2 hyperspeed - Animation: Minor cout adjustments for readability - Audio: Updated music URL to valid path - Audio: Adjusted cout messages to improve result clarity - Audio: Stopped music after 5 seconds to improve result clarity - Camera: Added frame cap and camera move speed for cross-platform consistency - Geometry: Added frame cap and ray move speed for cross-platform consistency - Sprites: Added frame cap and sprite move speed for cross-platform consistency - TCP Networking: Added endl to improve readability - Text: Updated font URL to valid path - UI: Changed font from Arial to Hara to avoid missing font in WSL/Linux
222448082Ashen
approved these changes
May 8, 2026
222448082Ashen
left a comment
There was a problem hiding this comment.
General Information
- Type of Change: Bug fix (Testing infrastructure)
Code Quality
- Repository: Correct. The PR is made to
splashkit-core. - Readability: High. The addition of
std::endlto console outputs and the use of named constants for movement speeds (RAY_STEP,speed) make the test code much cleaner and easier to read. - Maintainability: High. By switching from system-dependent fonts (
arial.ttf) to bundled assets (hara.ttf) and updating broken external URLs, this PR makes the test suite significantly more reliable across different development environments.
Functionality
- Correctness: The changes correctly address several stability issues in the interactive tests:
- CPU Usage: Adding framerate limits to
refresh_screen()(30 or 60 FPS) prevents the tests from consuming excessive CPU cycles on Windows/MSYS2. - Asset Availability: Updating URLs for
download_fontanddownload_musicensures that the networking tests don't fail due to dead links. - UX: Increasing movement speeds compensates for the new framerate limits, keeping the interactive elements responsive.
- CPU Usage: Adding framerate limits to
- Impact on Existing Functionality: No impact on core library code; these changes are limited to the
/src/testdirectory.
Testing
- Test Results: Logic check confirms that the updates to the test loops follow SplashKit best practices. Specifically, the inclusion of
stop_music()after a download test prevents audio from lingering across subsequent tests.
Documentation
- Documentation: N/A.
Pull Request Details
- Checklist Completion: All relevant items reviewed.
Recommendations & Observations
|
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.
Description
Problems
Integration tests run by
sktest.exesometimes produce inconsistent results between WSL and MSYS2 environments.Arial.ttfon WSL (A windows default font not included in theResourcesdirectory)Summary of changes
Fixes have been applied where possible without editing core SplashKit functions. There are some critical issues affecting MSYS2 which cause some tests to fail, but these bugs are not caused by the tests themselves, and will be updated in separate PRs. This PR also includes some minor changes unrelated to environment consistency (such as broken URLs and output messages). These have been addressed to allow the tests to run clearly.
coutadjustments for readabilitycoutmessages to improve result clarityKnown issues not addressed by this PR
Issues with running
sktest.exein MSYS2 environmentThere have been some reported issues running
sktest(at all) on MSYS2. Specifically, the animation test was found to loop indefinitely, and some users found the test runner was freezing even before tests were launched. This has been addressed in Tests investigation issues #132.Graphical bugs
There are inconsistent results when running graphics, input, and text tests in MSYS2, with graphical output displaying unexpected results. An example is shown here. This is likely related to drawing text in MSYS2, and cannot be addressed by updating the tests themselves.
Issues with download paths in MSYS2
Some download functions are buggy in MSYS2, most likely due to path differences in Windows vs Linux. This affects:
download_musicdownload_fontdownload_bitmapTerminal test fails
Fails on both WSL and MSYS2. Not yet investigated.
UI test fails on MSYS2
Due to an issue with
interface.cpp- addressed in Fix interface out of bounds error on MSYS2 #155.Bundle test fails bitmap freeing
Addressed in Fix bundle freeing: Bitmap resources not being freed #153.
Type of change
How Has This Been Tested?
sktestin WSL and MSYS2 environmentsTesting Checklist
Checklist