Skip to content
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

Implement dotnet test help option #41142

Merged
merged 57 commits into from
Jun 17, 2024
Merged

Conversation

mariam-abdulla
Copy link
Member

No description provided.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-DotNet Test untriaged Request triage from a team member labels May 24, 2024
Copy link
Member

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did review round some question and cleanup

sdk.sln Outdated Show resolved Hide resolved
src/Cli/dotnet/commands/dotnet-test/IPC/IClient.cs Outdated Show resolved Hide resolved
src/Cli/dotnet/commands/dotnet-test/IPC/Models/Module.cs Outdated Show resolved Hide resolved
src/Cli/dotnet/commands/dotnet-test/IPC/ObjectFieldIds.cs Outdated Show resolved Hide resolved
@mariam-abdulla mariam-abdulla marked this pull request as ready for review June 4, 2024 12:28
@mariam-abdulla mariam-abdulla requested a review from a team as a code owner June 4, 2024 12:28
@mariam-abdulla
Copy link
Member Author

mariam-abdulla commented Jun 11, 2024

@dotnet/domestic-cat We are using $(MicrosoftNETBuildTasksAssembly) in Microsoft.TestPlatform.ImportAfter.targets
but seems to be problematic in tests. Can you please recommend what can be done in that case?

@Forgind
Copy link
Member

Forgind commented Jun 11, 2024

@dotnet/domestic-cat We are using $(MicrosoftNETBuildTasksAssembly) in Microsoft.TestPlatform.ImportAfter.targets but seems to be problematic in tests. Can you please recommend what can be done in that case?

That seems to be defined in Microsoft.NET.Sdk.Common.targets, which only comes in if you either import it directly or reference it indirectly by, for instance, using Sdk="Microsoft.NET.Sdk". I looked at one of the failing tests, and it was not an SDK-style project, and it didn't import that .targets file directly, which explains why it evaluated to "". You should be able to change the test asset to import it (and make sure you import it before Microsoft.TestPlatform.ImportAfter.targets).

Do you need this task in legacy .*proj files?

@mariam-abdulla
Copy link
Member Author

@dotnet/domestic-cat We are using $(MicrosoftNETBuildTasksAssembly) in Microsoft.TestPlatform.ImportAfter.targets but seems to be problematic in tests. Can you please recommend what can be done in that case?

That seems to be defined in Microsoft.NET.Sdk.Common.targets, which only comes in if you either import it directly or reference it indirectly by, for instance, using Sdk="Microsoft.NET.Sdk". I looked at one of the failing tests, and it was not an SDK-style project, and it didn't import that .targets file directly, which explains why it evaluated to "". You should be able to change the test asset to import it (and make sure you import it before Microsoft.TestPlatform.ImportAfter.targets).

Do you need this task in legacy .*proj files?

When you say legacy, do you mean non SDK-style projects?

@Forgind
Copy link
Member

Forgind commented Jun 11, 2024

Yes

@mariam-abdulla
Copy link
Member Author

Yes

Then, we don't need the task there.

@Forgind
Copy link
Member

Forgind commented Jun 11, 2024

Yes

Then, we don't need the task there.

Perfect, so we would just need to fix up the tests to make sure we only need to have that property defined in sdk-style test projects. Let me know if you need any help with that!

@mariam-abdulla
Copy link
Member Author

Perfect, so we would just need to fix up the tests to make sure we only need to have that property defined in sdk-style test projects. Let me know if you need any help with that!

Yes, please let me know what should be done in that case.

@Forgind
Copy link
Member

Forgind commented Jun 14, 2024

/azp run

Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@MarcoRossignoli
Copy link
Member

@Forgind do we have some ETA to merge this first part of @mariam-abdulla PR? We need it to move to the next and unblock the task.

Copy link
Member

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tests are green now @Forgind @baronfel are you good for the merge, can you review?

For now we went for "manual" resolution of Microsoft.NET.Build.Tasks.dll https://github.com/dotnet/sdk/pull/41142/files#diff-3f7b2597025eca7c8bdaa8632fab1a3a6894415a704c2b08c2b0760ac708ba39 to fix the test failure
And added the cross targeting part close to the other one https://github.com/dotnet/sdk/pull/41142/files#diff-177f9060fda1f47c96d4e08705bbaab76098d76df09f8911eeea06586db65fc6

@Forgind
Copy link
Member

Forgind commented Jun 17, 2024

I haven't really reviewed this properly, so I'll leave it to @baronfel and @MiYanni (who is now domestic-cat) to decide when to merge.

Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - the main thing was the Task location and that's been addressed. Thanks folks, excited to see how this evolves.

@baronfel
Copy link
Member

@MarcoRossignoli / @mariam-abdulla please feel free to merge whenever you like - consider squashing though since many of the individual commits in this PR aren't meaningful to the end result.

@nohwnd nohwnd merged commit 4290dd7 into main Jun 17, 2024
36 checks passed
@nohwnd nohwnd deleted the dev/mabdullah/ImplementDotnetTestHelp branch June 17, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-DotNet Test untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants