-
Notifications
You must be signed in to change notification settings - Fork 353
Fixed testhost crash for net7 #4112
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
Merged
cvpoienaru
merged 10 commits into
microsoft:main
from
cvpoienaru:dev/copoiena/testhost-crash-net7-preview
Nov 11, 2022
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c224a5f
Fixed testhost crash
9f45acf
Added tests
2e718a1
Fixed tests
e26908e
Forward console params environment variables to testhost process
1269531
Update src/Microsoft.TestPlatform.PlatformAbstractions/common/System/…
cvpoienaru 95593bc
Fixed code review comments
83f9388
Merge branch 'dev/copoiena/testhost-crash-net7-preview' of https://gi…
67ab264
Renamed nullable conflict identifier
a6b018e
Fixed review comments
85fd199
Fixed build failure
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
...atform.Client/AttachmentsProcessing/InProcessTestRunAttachmentsProcessingEventsHandler.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
|
|
||
| using Microsoft.VisualStudio.TestPlatform.ObjectModel; | ||
| using Microsoft.VisualStudio.TestPlatform.ObjectModel.Client; | ||
| using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging; | ||
|
|
||
| namespace Microsoft.VisualStudio.TestPlatform.Client; | ||
|
|
||
| internal class InProcessTestRunAttachmentsProcessingEventsHandler : ITestRunAttachmentsProcessingEventsHandler | ||
| { | ||
| private readonly ITestRunAttachmentsProcessingEventsHandler _eventsHandler; | ||
|
|
||
| public InProcessTestRunAttachmentsProcessingEventsHandler( | ||
| ITestRunAttachmentsProcessingEventsHandler eventsHandler) | ||
| { | ||
| _eventsHandler = eventsHandler; | ||
| } | ||
|
|
||
| public void HandleLogMessage(TestMessageLevel level, string? message) | ||
| { | ||
| _eventsHandler.HandleLogMessage(level, message); | ||
| } | ||
|
|
||
| public void HandleProcessedAttachmentsChunk(IEnumerable<AttachmentSet> attachments) | ||
| { | ||
| // Not implemented by design, keep in sync with the same named method from | ||
| // TestRunAttachmentsProcessingEventsHandler.cs. | ||
| throw new NotImplementedException(); | ||
| } | ||
|
|
||
| public void HandleRawMessage(string rawMessage) | ||
| { | ||
| // No-op by design. | ||
| // | ||
| // For out-of-process vstest.console, raw messages are passed to the translation layer but | ||
| // they are never read and don't get passed to the actual events handler in TW. If they | ||
| // were (as it happens for in-process vstest.console since there is no more translation | ||
| // layer) a NotImplemented exception would be raised as per the time this of writing this | ||
| // note. | ||
| // | ||
| // Consider changing this logic in the future if TW changes the handling logic for raw | ||
| // messages. | ||
| } | ||
|
|
||
| public void HandleTestRunAttachmentsProcessingComplete( | ||
| TestRunAttachmentsProcessingCompleteEventArgs attachmentsProcessingCompleteEventArgs, | ||
| IEnumerable<AttachmentSet>? lastChunk) | ||
| { | ||
| _eventsHandler.HandleTestRunAttachmentsProcessingComplete( | ||
| attachmentsProcessingCompleteEventArgs, | ||
| lastChunk); | ||
| } | ||
|
|
||
| public void HandleTestRunAttachmentsProcessingProgress( | ||
| TestRunAttachmentsProcessingProgressEventArgs attachmentsProcessingProgressEventArgs) | ||
| { | ||
| _eventsHandler.HandleTestRunAttachmentsProcessingProgress( | ||
| attachmentsProcessingProgressEventArgs); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/Microsoft.TestPlatform.Execution.Shared/DebuggerBreakpoint.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/Microsoft.TestPlatform.Execution.Shared/ProcDumpExecutableHelper.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Microsoft.TestPlatform.PlatformAbstractions/Friends.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
|
|
||
| #region Product Assemblies | ||
|
|
||
| [assembly: InternalsVisibleTo("vstest.console, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] | ||
| [assembly: InternalsVisibleTo("vstest.console.arm64, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] | ||
|
|
||
| #endregion | ||
|
|
||
| #region Test Assemblies | ||
|
|
||
| [assembly: InternalsVisibleTo("vstest.console.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] | ||
|
|
||
| #endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.