Skip to content

Add Lua tests on Github Windows build#7695

Merged
vadi2 merged 3 commits intoMudlet:developmentfrom
Arian8j2:lua-test-pr
Feb 8, 2025
Merged

Add Lua tests on Github Windows build#7695
vadi2 merged 3 commits intoMudlet:developmentfrom
Arian8j2:lua-test-pr

Conversation

@Arian8j2
Copy link
Copy Markdown
Contributor

@Arian8j2 Arian8j2 commented Feb 7, 2025

Brief overview of PR changes/additions

Fixes #6688

Other info (issues closed, discussion etc)

/claim #6688

@Arian8j2 Arian8j2 requested a review from a team as a code owner February 7, 2025 11:19
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Feb 7, 2025

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@Arian8j2 Arian8j2 changed the title Run Lua tests on Github Windows build Add Lua tests on Github Windows build Feb 7, 2025
@Arian8j2
Copy link
Copy Markdown
Contributor Author

Arian8j2 commented Feb 7, 2025

@vadi2
example of the tests failing and an example of the tests passing

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! It looks great in CI.

Could you double-check the console output still works locally? Latest development build shows this for me:

PS C:\Users\vadim.peretokin> C:\Mac\Home\Downloads\Mudlet-4.19.1-testing-9831acc1-windows-64\Mudlet.exe
PS C:\Users\vadim.peretokin> Discord integration loaded. Using functions from: "discord-rpc64.dll"
mudlet::setupConfig() INFO: using config dir: "C:/Users/vadim.peretokin/.config/mudlet"
main(...) INFO - setting QT_MEDIA_BACKEND enviromental variable to: "windows".
Got CLI profiles: QList()
No CLI profiles specified, checking environment variable
Environment MUDLET_PROFILES value: ""
mudlet::mudlet() INFO - 'windows11' has been detected as the style factory in use - no styling fixes applied.
"Mudlet self-test" doesn't have a valid icon
qt.gui.imageio: libpng warning: bKGD: invalid

While this PR is just this:

PS C:\Users\vadim.peretokin> C:\Mac\Home\Downloads\Mudlet-4.19.1-testing-pr7695-1c051940-windows-64\Mudlet.exe
PS C:\Users\vadim.peretokin>

@Arian8j2
Copy link
Copy Markdown
Contributor Author

Arian8j2 commented Feb 7, 2025

Hm, You are right, In Powershell the development build shows the log but in MSYS2 it doesn't, And for this PR it's opposite, It shows log on MSYS2 but in Powershell it doesn't. Maybe check if MSYSTEM environment variable exists in runtime and if not just use the previous solution:

#ifdef Q_OS_WINDOWS
if (AttachConsole(ATTACH_PARENT_PROCESS)) {
    if (qgetenv("MSYSTEM").isNull()) {
        // print stdout to console if Mudlet is started in a console in Windows
        // credit to https://stackoverflow.com/a/41701133 for the workaround
        freopen("CONOUT$", "w", stdout);
        freopen("CONOUT$", "w", stderr);
    } else {
        // simply print qt logs into stdout and stderr if it's MSYS2
        qInstallMessageHandler(windowsConsoleMessageHandler);
    }
}
#endif 

Whats your opinion?

@vadi2
Copy link
Copy Markdown
Member

vadi2 commented Feb 7, 2025

Ahh, interesting difference. Okay, lets try this!

@Arian8j2
Copy link
Copy Markdown
Contributor Author

Arian8j2 commented Feb 7, 2025

Check the latest build it seems fixed

Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perf!

@vadi2 vadi2 merged commit 966357e into Mudlet:development Feb 8, 2025
@Arian8j2 Arian8j2 deleted the lua-test-pr branch February 14, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run Lua tests on Github Windows build

2 participants