-
Notifications
You must be signed in to change notification settings - Fork 9
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
OSOE-464: Making dotnet test output go to the build output to aid debugging, as well as printing ITestOutputHelper content #101
Conversation
# Conflicts: # .github/workflows/build-and-test-orchard-core.yml
…s printing ITestOutputHelper content
# Conflicts: # .github/workflows/build-and-test-orchard-core.yml
|
||
if ($needsGrouping) { Write-Output "::group::Test Failed: $test" } | ||
|
||
bash -c "cat test.out | grep -v 'Connection refused \[::ffff:127.0.0.1\]' | grep -v 'ChromeDriver was started successfully'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we still filter out these pointless "Connection refused" and "ChromeDriver" log lines on dotnet test @dotnetTestSwitches
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know or have found a way to live-filter a streaming output, though I only have smallish experience with PS.
The goal here is for the output of the tests to show up in the log continuously (to pinpoint what the last thing was before the runner was killed due to timeout). If there's a file at the end of the dotnet test
call then you can grep like this, but we can't wait for a file.
We could still redirect to a file and tail it and that can be filtered but going through a file doesn't seem like the best idea, and we also need to somehow know when the stream actually ended and quit the Wait
.
So, I don't know. It seems to me that implementing grouping around the test project if it doesn't have its custom group and letting UI tests group themselves, as well as filtering out such messages need a file. If we have a file, however, we won't have a continuous output.
Do you have any suggestions by chance?
BTW I'm also trying to figure out where the annoying log messages come from and disable them in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet test @dotnetTestSwitches 2>&1 | ? { $_ -notlike '*Connection refused [[]::ffff:127.0.0.1[]]*' -and $_ -notlike '*ChromeDriver was started successfully*' }
should filter it line-by-line as it's passed to the pipe. We can live without the outer grouping until they finally add named groups to the runner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice, so this works like this!
…d ErrorDuringSetupShouldHaltTest errrors to appear
… expected ErrorDuringSetupShouldHaltTest errrors to appear" This reverts commit 0eeda56.
This reverts commit 829c298.
# Cancelling the workflow in a post-script (like this: | ||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost; can also be done with | ||
# this action: https://github.com/webiny/action-post-run, see Git history of this file) wouldn't help the status, it | ||
# would still be cancelled. It actually indeed is, but it would be nicer to set it to failed, but there seems to be no | ||
# way to do this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OSOE-464