Skip to content

Add SBRPTests #689

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
merged 58 commits into from
Aug 3, 2023
Merged

Add SBRPTests #689

merged 58 commits into from
Aug 3, 2023

Conversation

v-chayan
Copy link
Contributor

@v-chayan v-chayan commented Jun 1, 2023

Implement some basic tests. Resolves dotnet/source-build#3089

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

Thanks for the PR that introduces tests. This will be helpful in preventing regressions.

Friendly reminder to link PRs to the issues they are addressing.

This new test should be integrated into CI. Builds/PR validation should fail if the tests don't pass.

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

Please change the test project to use Arcade's defaults to avoid all the boilerplate code. Also, consider using the default build scripts for running tests and test their behavior not just for Unix but also for Windows.

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

I like the utilizing of the arcade testing infra versus adding a new run test script.

Copy link
Member

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

Friendly reminder to integrate the tests into the pipeline so that they run in PR validiation.

@v-chayan v-chayan requested a review from ViktorHofer June 29, 2023 08:23
new object[] { "System.Xml.ReaderWriter", "4.0.11", PackageType.Reference },
new object[] { "Microsoft.Extensions.Logging.Abstractions", "7.0.1", PackageType.Reference },
new object[] { "Microsoft.CodeAnalysis.CSharp", "3.11.0", PackageType.Reference },
new object[] { "System.Security.Cryptography.Pkcs", "7.0.2", PackageType.Reference },
Copy link
Member

Choose a reason for hiding this comment

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

We should be validating text only packages as well. All the test infrastructure was defined but no test data for them were added.

Suggested change
new object[] { "System.Security.Cryptography.Pkcs", "7.0.2", PackageType.Reference },
new object[] { "System.Security.Cryptography.Pkcs", "7.0.2", PackageType.Reference },
new object[] { "Microsoft.Build.NoTargets", "3.7.0", PackageType.Text },

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

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

You checked in the project file which I think you didn't want to? Also, the file name casing of the project file seems wrong.

@MichaelSimons
Copy link
Member

You checked in the project file which I think you didn't want to? Also, the file name casing of the project file seems wrong.

The package was regenerated with the latest tooling which is necessary if we are going to use it as a baseline in the tests. The casing change is because the tooling uses the package name's casing.

<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Microsoft.Build.NoTargets</id>
<version>3.7.0</version>
<authors>Microsoft</authors>
<license type="expression">MIT</license>
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<icon>MSBuild-NuGet-Icon.png</icon>
Copy link
Member

Choose a reason for hiding this comment

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

This icon file should be deleted.

Copy link
Member

Choose a reason for hiding this comment

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

I tried deleting the icon file, but the test failed. Because the icon file is still generated by the latest tooling. So I reverted the change and kept the icon file.

@ViktorHofer
Copy link
Member

The package was regenerated with the latest tooling which is necessary if we are going to use it as a baseline in the tests. The casing change is because the tooling uses the package name's casing.

I see. So the old checked-in project file had an incorrect casing. Sounds good then.

@ViktorHofer ViktorHofer enabled auto-merge (squash) August 3, 2023 13:59
@ViktorHofer ViktorHofer merged commit 21584ce into dotnet:main Aug 3, 2023
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.

[SBRP] Add unit tests to validate basic generate.sh / generate.cmd usage scenarios
5 participants