Skip to content

Escape hatch: share stdout with node children#3130

Merged
AndyGerlicher merged 1 commit intodotnet:vs15.7from
rainersigwald:vstest-stdout-escape-hatch
Mar 25, 2018
Merged

Escape hatch: share stdout with node children#3130
AndyGerlicher merged 1 commit intodotnet:vs15.7from
rainersigwald:vstest-stdout-escape-hatch

Conversation

@rainersigwald
Copy link
Copy Markdown
Member

The VSTest runner emits log messages to its stdout. So far, in .NET
Core, that has resulted in them getting piped all the way up through
the worker MSBuild that launched the task, the entry-point MSBuild
coordinating the build, and the dotnet test invocation that started
it all.

The introduction of node reuse for .NET Core makes this untenable:
worker nodes should not share stdout with the process that happened to
launch them, because they will be long-lived and may do entirely
unrelated builds.

But for now, this breaks the dotnet test scenario. This commit creates
an escape hatch environment variable
MSBUILDENSURESTDOUTFORTASKPROCESSES that can be used in combination
with /nodereuse:false to create a cone of MSBuild processes that all
share std handles.

Enables workaround for microsoft/vstest#1503.

The VSTest runner emits log messages to its stdout. So far, in .NET
Core, that has resulted in them getting piped all the way up through
the worker MSBuild that launched the task, the entry-point MSBuild
coordinating the build, and the `dotnet test` invocation that started
it all.

The introduction of node reuse for .NET Core makes this untenable:
worker nodes should not share stdout with the process that happened to
launch them, because they will be long-lived and may do entirely
unrelated builds.

But for now, this breaks the `dotnet test` scenario. This commit creates
an escape hatch environment variable
`MSBUILDENSURESTDOUTFORTASKPROCESSES` that can be used in combination
with `/nodereuse:false` to create a cone of MSBuild processes that all
share std handles.

Enables workaround for microsoft/vstest#1503.
@rainersigwald
Copy link
Copy Markdown
Member Author

@AndyGerlicher
Copy link
Copy Markdown
Contributor

Looks good, but I want #3131 before we do a build.

@AndyGerlicher AndyGerlicher merged commit afc81fa into dotnet:vs15.7 Mar 25, 2018
@rainersigwald rainersigwald deleted the vstest-stdout-escape-hatch branch March 25, 2018 12:24
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.

2 participants