Skip to content

Commit d412fab

Browse files
Separate out the own package in a different color
1 parent b68d903 commit d412fab

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

SmokeTests/SmokeTestAnalysis.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ if (Test-Path $PackagePath)
8282
$PackageSmokeTestFiles = Get-ChildItem $TempFolder -Recurse -Attributes !Directory -Include "SmokeTest*"
8383

8484
# TODO: Make function or regex better to extra package name more easily based on a template string at the top or something...
85-
Write-Host ("{0} Additional Footprint: {1:n0} bytes" -f $Package.Name.substring(10, $Package.Name.Length - 32), (($PackageFiles | Measure-Object -Property Length -sum).Sum + ($PackageSmokeTestFiles | Measure-Object -Property Length -sum).Sum - $BaselineFootprint))
85+
$PackageShortName = $Package.Name.substring(10, $Package.Name.Length - 32)
86+
Write-Host ("{0} Additional Footprint: {1:n0} bytes" -f $PackageShortName, (($PackageFiles | Measure-Object -Property Length -sum).Sum + ($PackageSmokeTestFiles | Measure-Object -Property Length -sum).Sum - $BaselineFootprint))
8687

8788
# Quick check on the base exe file/symbols differences
8889
foreach ($file in $SmokeTestFiles)
@@ -118,7 +119,14 @@ if (Test-Path $PackagePath)
118119
# List remaining (new) files to this package
119120
foreach ($file in $PackageFiles)
120121
{
121-
Write-Host (" Additional: {0} = {1:n0}" -f $file.Name, $file.Length) -ForegroundColor Yellow
122+
if ($file.Name -match $PackageShortName)
123+
{
124+
Write-Host (" Lib (self): {0} = {1:n0}" -f $file.Name, $file.Length) -ForegroundColor White
125+
}
126+
else
127+
{
128+
Write-Host (" Additional: {0} = {1:n0}" -f $file.Name, $file.Length) -ForegroundColor Yellow
129+
}
122130
}
123131

124132
# TODO: Especially if we add comparison to the main branch, we should format as an actual table and colorize via VT: https://stackoverflow.com/a/49038815/8798708

0 commit comments

Comments
 (0)