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

Add scenario tests project #17636

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/SourceBuild/content/repo-projects/dotnet.proj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<RepositoryReference Include="source-build-reference-packages" />
<RepositoryReference Include="arcade" />

<RepositoryReference Include="scenario-tests" />
Copy link
Member

Choose a reason for hiding this comment

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

This should be listed after source-build-externals, right? Since a dependency was declared on it scenario-tests.proj.

Copy link
Member

Choose a reason for hiding this comment

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

This should not be considered a toolset project. Toolset projects are the special bootstrapping tool projects used by everything else. I think this should be at the very end of the list - you want it to use all built packages and nothing from n-1. Perhaps this can go in it's own section

Copy link
Member Author

Choose a reason for hiding this comment

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

It lists its dependencies (which are minimal) in the RepositoryReference section of the repo project. This is really what each project should do in order to enable parallelism, and this project would only list the roots of the dependency tree (dotnet/source-build#3608), which would end up as installer and scenario-tests, IIRC.


<!-- Product Repos -->
<RepositoryReference Include="command-line-api" />
<RepositoryReference Include="sourcelink" />
Expand Down
15 changes: 15 additions & 0 deletions src/SourceBuild/content/repo-projects/scenario-tests.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<PropertyGroup>
<BuildCommand>$(StandardSourceBuildCommand) $(StandardSourceBuildArgs)</BuildCommand>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<ItemGroup>
<RepositoryReference Include="source-build-externals" />
<RepositoryReference Include="source-build-reference-packages" />
<RepositoryReference Include="arcade" />
Copy link
Member

Choose a reason for hiding this comment

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

This in theory should depend on everything - perhaps just declaring a dependency on installer is sufficient.

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't actually need to depend on everything. It has no dependencies on the installer or runtime or anything like that for building. Only arcade, SBE and SBRP.

Copy link
Member Author

Choose a reason for hiding this comment

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

The project executions would depend on the installed SDK, but not to build the harness and the xunit code.

Copy link
Member

Choose a reason for hiding this comment

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

Right I get that but from a build perspective it could depend on all repos. You want it to compile against the latest libraries for example. Declaring a dependency on installer feels maintainable versus declaring all repo dependencies.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's not how the tests work though. The test projects are not supposed to build at VMR build time. They build using on an installed product. So for instance, with the template tests, new projects are created using the installed SDK, then built at test execution time.

Copy link
Member Author

Choose a reason for hiding this comment

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

The only dependencies that the repo build has are SBE and SBRP, and arcade. There are no other package refs that would be used at scenario-tests's repo build time.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, of course - I wasn't thinking about this correctly.

</ItemGroup>
</Project>