diff --git a/appveyor.yml b/appveyor.yml index 409f5923a..3a9a34b8a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,6 +52,8 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green } + $global:wsl_install_running = true + $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { Function WSLExec($Text, $Cmd) { Write-Host "$Text" @@ -67,6 +69,7 @@ clone_script: WSLExec "WSL install..." "sudo apt-get -y install --reinstall --no-install-recommends git ca-certificates build-essential pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev libbz2-dev qtbase5-dev cmake 1>/dev/null" WSLExec "WSL QT fix..." "sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5" Add-AppveyorMessage -Message "WSL setup took $(([System.Environment]::TickCount-$WSLInstallTime) / 1000) sec" -Category Information + $global:wsl_install_running = false } $env:PSInstallTime=[System.Environment]::TickCount @@ -212,8 +215,6 @@ build_script: } } - $WSLInstalljob = Get-Job -Name WSLInstall - $WSLjob = Start-Job -Name WSLCompile -ScriptBlock { Function ExecWSLCmd($Cmd) { cd $env:wsl_git_path @@ -236,9 +237,15 @@ build_script: } #WSL: wait for installation to finish - Receive-Job -Wait -Job $input -ErrorAction SilentlyContinue + if($global:wsl_install_running){ + Write-Host "Waiting for WSL installation to finish..." -NoNewLine + while($global:wsl_install_running) { + Start-Sleep -s 5 + } + Write-Host "$Name [ OK ]" -ForegroundColor Green + } - Add-AppveyorMessage -Message "WSL start: $env:wsl_install_running" -Category Information + Add-AppveyorMessage -Message "WSL start: $global:wsl_install_running" -Category Information #Windows Subsystem for Linux (WSL) Write-Host "---------- WSL make ----------" -ForegroundColor Yellow @@ -266,7 +273,7 @@ build_script: Write-Host "---------- WSL cmake tests ----------" -ForegroundColor Yellow ExecWSLCmd './tools/pm3_tests.sh --clientbin client/build/proxmark3 client' ExecCheck "WSL cmake Tests" - } -InputObject $WSLInstalljob + } #ProxSpace @@ -324,6 +331,8 @@ build_script: ExecCheck "PS cmake Tests" + Receive-Job -Wait -Name WSLInstall -ErrorAction SilentlyContinue + Receive-Job -Wait -Job $WSLjob test_script: