Skip to content

Commit 8bf9406

Browse files
authored
Merge pull request #77656 from ahoppen/action-output
[Windows] Change log output to `Testing …` when testing a SwiftPM project in build.ps1
2 parents 1b2a3d3 + 91ca044 commit 8bf9406

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

utils/build.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,11 +1237,17 @@ function Build-SPMProject {
12371237
[string[]] $AdditionalArguments
12381238
)
12391239

1240+
$ActionForOutput = switch ($Action) {
1241+
Build { "Building" }
1242+
Test { "Testing" }
1243+
TestParallel { "Testing" }
1244+
}
1245+
12401246
if ($ToBatch) {
12411247
Write-Output ""
1242-
Write-Output "echo Building '$Src' to '$Bin' for arch '$($Arch.LLVMName)'..."
1248+
Write-Output "echo $ActionForOutput '$Src' to '$Bin' for arch '$($Arch.LLVMName)'..."
12431249
} else {
1244-
Write-Host -ForegroundColor Cyan "[$([DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss"))] Building '$Src' to '$Bin' for arch '$($Arch.LLVMName)'..."
1250+
Write-Host -ForegroundColor Cyan "[$([DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss"))] $ActionForOutput '$Src' to '$Bin' for arch '$($Arch.LLVMName)'..."
12451251
}
12461252

12471253
$Stopwatch = [Diagnostics.Stopwatch]::StartNew()

0 commit comments

Comments
 (0)