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

[Windows] Move console redirection to the OS constructor to allow test output. #41325

Closed
wants to merge 1 commit into from

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Aug 17, 2020

Move console redirection from DisplaySever to the OS constructor.

Fixes #41307

Capture

@Xrayez
Copy link
Contributor

Xrayez commented Aug 17, 2020

This does fix the issue with output, but the colors are gone (maybe doctest's issue as well). 😮

And I have to Ctrl + C to manually exit to previous terminal/process now.

@bruvzg
Copy link
Member Author

bruvzg commented Aug 17, 2020

This does fix the issue with output, but the colors are gone (maybe doctest's issue as well). 😮

I never had color output on Windows.

And I have to Ctrl + C to manually exit to previous terminal/process now.

Enter should work too (or entering any command), terminal it's not redrawing prompt after app has exited (unlikely it's possible to fix it).

Probably we should have build option as it was originally proposed in godotengine/godot-proposals#1341 as well (but have it disabled by default).

@Xrayez
Copy link
Contributor

Xrayez commented Aug 17, 2020

I never had color output on Windows.

Example output with colors on VSCode terminal:

.\bin\godot.windows.tools.64.exe --test --success -sf="*test_string.h*"

Annotation 2020-08-17 151028

cmd:

Annotation 2020-08-17 151212

Probably we should have build option as it was originally proposed in godotengine/godot-proposals#1341 as well (but have it disabled by default).

In theory this could be done specifically for tests to define TESTS_ENABLED for Windows sources from env["tests"]. But I'm not sure how it would behave with godot --script "res://test.gd" --no-window (--no-window is only implemented for Windows too), need to test this as well.

@bruvzg bruvzg closed this Aug 17, 2020
@bruvzg bruvzg deleted the win_tests_output_redirect branch August 26, 2020 11:08
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.

The output of doctest is not visible when running tests on Windows
3 participants