From e21401751a7852b13070e3a95ff08058dd19dd5c Mon Sep 17 00:00:00 2001 From: Juha Karjalainen Date: Thu, 22 Nov 2018 16:21:17 +0200 Subject: Provisioning: Change how executables are waited to finish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch only affects Windows. Python3 provisioning took over 30-35 minutes. As both 32 and 64 bit versions are provisioned it took over 1h this change lowers time taken to 5 minutes. start-process with -wait flag waits for given process and its sub-processes to exit. Wait-process insteads just waits for process to exit. Change-Id: Ib9a323dcf9e2d07318a0d259a72ca4c4d0a4ed80 Reviewed-by: Simo Fält --- coin/provisioning/common/windows/helpers.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'coin') diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1 index 794f1b5d..cbf2371f 100644 --- a/coin/provisioning/common/windows/helpers.ps1 +++ b/coin/provisioning/common/windows/helpers.ps1 @@ -27,7 +27,8 @@ function Run-Executable $p = Start-Process -FilePath "$Executable" -Wait -PassThru } else { Write-Host "Running `"$Executable`" with arguments `"$Arguments`"" - $p = Start-Process -FilePath "$Executable" -ArgumentList $Arguments -Wait -PassThru + $p = Start-Process -FilePath "$Executable" -ArgumentList $Arguments -PassThru + Wait-Process -InputObject $p } if ($p.ExitCode -ne 0) { throw "Process $($Executable) exited with exit code $($p.ExitCode)" -- cgit v1.2.3