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

Trim whitespace in ./Misc/contentHash/dotnetRuntime/* #2915

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/linux-arm
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7539d33c35b0bc94ee67e3c0de1a6bac5ef89ce8e8efaa110131fa0520a54fb4
7539d33c35b0bc94ee67e3c0de1a6bac5ef89ce8e8efaa110131fa0520a54fb4
2 changes: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/linux-arm64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d71a31f9a17e1a41d6e1edea596edfa68a0db5948ed160e86f2154a547f4dd10
d71a31f9a17e1a41d6e1edea596edfa68a0db5948ed160e86f2154a547f4dd10
2 changes: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/linux-x64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3c2f700d8a995efe7895614ee07d9c7880f872d214b45983ad6163e1931870ab
3c2f700d8a995efe7895614ee07d9c7880f872d214b45983ad6163e1931870ab
2 changes: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/osx-arm64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b2d85c95ecad13d352f4c7d31c64dbb0d9c6381b48fa5874c4c72a43a025a8a1
b2d85c95ecad13d352f4c7d31c64dbb0d9c6381b48fa5874c4c72a43a025a8a1
2 changes: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/osx-x64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
417d835c1a108619886b4bb5d25988cb6c138eb7b4c00320b1d9455c5630bff9
417d835c1a108619886b4bb5d25988cb6c138eb7b4c00320b1d9455c5630bff9
2 changes: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/win-arm64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8f35aaecfb53426ea10816442e23065142bab9dd0fb712a29e0fc471d13c44ac
8f35aaecfb53426ea10816442e23065142bab9dd0fb712a29e0fc471d13c44ac
2 changes: 1 addition & 1 deletion src/Misc/contentHash/dotnetRuntime/win-x64
Original file line number Diff line number Diff line change
@@ -1 +1 @@
811c7debdfc54d074385b063b83c997e5360c8a9160cd20fe777713968370063
811c7debdfc54d074385b063b83c997e5360c8a9160cd20fe777713968370063
24 changes: 24 additions & 0 deletions src/Test/L0/PackagesTrimL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,29 @@ public async Task RunnerLayoutParts_CheckExternalsHash()
Assert.True(string.Equals(hashResult, File.ReadAllText(externalsHashFile).Trim()), $"Hash mismatch for externals. You might need to update `Misc/contentHash/externals/{BuildConstants.RunnerPackage.PackageName}` or check if `hashFiles.ts` ever changed recently.");
}
}

[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Common")]
public Task RunnerLayoutParts_ContentHashFilesNoNewline()
Copy link
Member Author

Choose a reason for hiding this comment

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

add a test to make sure we don't add any whitespace in the future...

{
using (TestHostContext hc = new(this))
{
Tracing trace = hc.GetTrace();

var dotnetRuntimeHashFile = Path.Combine(TestUtil.GetSrcPath(), $"Misc/contentHash/dotnetRuntime/{BuildConstants.RunnerPackage.PackageName}");
var dotnetRuntimeHash = File.ReadAllText(dotnetRuntimeHashFile);
trace.Info($"Current hash: {dotnetRuntimeHash}");

var externalsHashFile = Path.Combine(TestUtil.GetSrcPath(), $"Misc/contentHash/externals/{BuildConstants.RunnerPackage.PackageName}");
var externalsHash = File.ReadAllText(externalsHashFile);
trace.Info($"Current hash: {externalsHash}");

Assert.False(externalsHash.Any(x => char.IsWhiteSpace(x)), $"Found whitespace in externals hash file.");
Assert.False(dotnetRuntimeHash.Any(x => char.IsWhiteSpace(x)), $"Found whitespace in dotnet runtime hash file.");

return Task.CompletedTask;
}
}
}
}