Skip to content

Commit

Permalink
trim whitespace. (#2915)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingluoHuang committed Oct 9, 2023
1 parent 65361e0 commit 22d4310
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 7 deletions.
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()
{
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;
}
}
}
}

0 comments on commit 22d4310

Please sign in to comment.