-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[main] Fix dll detection in dotnet test #51264
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
16eca88
Property with .dll should not offload test run to vstest.console.exe
nohwnd 6009bdf
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 c519dfe
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 c598953
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 71c8d03
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 675aa8d
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 9326ba6
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 90760b3
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 032cb89
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 a591afa
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 5c77820
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 4d24b96
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 ee56873
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 5d64a11
Merge branch 'main' into backport/pr-50926-to-main
DonnaChen888 817b7f7
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 a4dd2fb
Merge branch 'main' into backport/pr-50926-to-main
SimonZhao888 a217158
Merge branch 'main' into backport/pr-50926-to-main
DonnaChen888 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
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 |
|---|---|---|
|
|
@@ -298,11 +298,16 @@ internal static int RunArtifactPostProcessingIfNeeded(string testSessionCorrelat | |
|
|
||
| private static bool ContainsBuiltTestSources(string[] args) | ||
| { | ||
| foreach (string arg in args) | ||
| for (int i = 0; i < args.Length; i++) | ||
| { | ||
| if (!arg.StartsWith("-") && | ||
| (arg.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || arg.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))) | ||
| string arg = args[i]; | ||
| if (arg.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || arg.EndsWith(".exe", StringComparison.OrdinalIgnoreCase)) | ||
| { | ||
| var previousArg = i > 0 ? args[i - 1] : null; | ||
| if (previousArg != null && CommonOptions.PropertiesOption.Aliases.Contains(previousArg)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This approach will probably not work for #51249 as the dll isn't provided in |
||
| { | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| } | ||
|
|
||
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
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.
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.
We shouldn't have removed this
StartsWithcheck. This is likely the cause of #51249.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.
the whole parsing changes, so if -dl is not split the same way -p is then the argument is no longer one string "-p:something.dll"
but instead it is
"-p", "something.dll"
essentially there is additioanl split on :, but maybe that parser is only applicable to property, I think I pointed to it in the issue. Will have to look , and add test for it.
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.
ignore me, I am tired :D