Skip to content

Capture stderr to temp file and output it in test results#438

Closed
MartinMystikJonas wants to merge 2 commits into
nette:masterfrom
MartinMystikJonas:stderr-file
Closed

Capture stderr to temp file and output it in test results#438
MartinMystikJonas wants to merge 2 commits into
nette:masterfrom
MartinMystikJonas:stderr-file

Conversation

@MartinMystikJonas

Copy link
Copy Markdown
Contributor
  • new feature
  • BC break: no (only additional output in test results)

@MartinMystikJonas

Copy link
Copy Markdown
Contributor Author

Any idea why output tests on my computer works just fine but fails in GitHub actions? Output does not match but it seems it should. I suspect some whitespace difference but cannot find it.

@MartinMystikJonas MartinMystikJonas force-pushed the stderr-file branch 4 times, most recently from 5cca3ef to 4d35048 Compare July 17, 2022 07:17
@MartinMystikJonas

Copy link
Copy Markdown
Contributor Author

I still struggle to find what causes tests to fail only in CI. I identified that it is caused by spaces only lines in actual output on CI that does not happens on by local build. But I have no idea why. I will do some more experimentation to find it.

@MartinMystikJonas MartinMystikJonas force-pushed the stderr-file branch 2 times, most recently from 0d3094b to 43ca562 Compare July 17, 2022 07:33
@MartinMystikJonas

Copy link
Copy Markdown
Contributor Author

Finall I made it pass. I also fixed one coding standard error.

@dg @milo Could oyu check it out and let me know what do you think?

@milo

milo commented Jul 18, 2022

Copy link
Copy Markdown
Member

Looks great. I'll polish it a little bit and I'll merge it.

@milo

milo commented Jul 19, 2022

Copy link
Copy Markdown
Member

@MartinMystikJonas

Copy link
Copy Markdown
Contributor Author

@milo Looks OK

@MartinMystikJonas

Copy link
Copy Markdown
Contributor Author

@milo Is there anything I should do now to finish this PR?

milo pushed a commit to milo/tester that referenced this pull request Jul 21, 2022
@milo

milo commented Jul 21, 2022

Copy link
Copy Markdown
Member

Thank you. I've merged it.

@dg

dg commented Aug 29, 2022

Copy link
Copy Markdown
Member

Do you have any idea why the RunnerOutput\OutputHandlers.phpt test is not passing on Windows? Difference is in progress line in OutputHandlers.expect.console.txt:

actual:

PHP 8.2.0beta3 (cgi-fcgi) | …

FFFF...ssss

expected:

PHP 8.2.0beta3 (cgi-fcgi) | …

F.sF.sFsF.s

@MartinMystikJonas

MartinMystikJonas commented Aug 29, 2022

Copy link
Copy Markdown
Contributor Author

I have seen something similar when temp dir was not purged between individual tests so order of executed tests prioritized failed ones. Why it happens on windows I do not know.

@dg

dg commented Aug 29, 2022

Copy link
Copy Markdown
Member

Bingo, thanks!

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.

3 participants