diff --git a/appveyor.yml b/appveyor.yml index b8e3636f2..b77cef02d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -73,12 +73,13 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green - Write-Host "Update msys2 packages..." -NoNewLine + Write-Host "Update msys2 packages..." $env:Path = "C:\ProxSpace\msys2\usr\bin;C:\ProxSpace\msys2\mingw32\bin;C:\ProxSpace\gcc-arm-none-eabi\bin;$env:Path" Function ExecUpdate($Name, $Cmd, $ErrorLine) { + Write-Host "Exec [$Name]... " -NoNewLine #--- begin Job $Job = Start-Job -Name "$Name" -ScriptBlock { @@ -96,10 +97,16 @@ clone_script: $JobTime=[System.Environment]::TickCount while($true) { - Receive-Job -Job $Job -Keep -OutVariable Res 2>&1 6>&1 | Out-Null + Try { + $Res = Receive-Job -Job $Job -Keep 2>&1 6>&1 + } + Catch { + $Res = "" + Write-host "error in Receive-Job" + } if ($Res -is "String" -and $Res -like "*$ErrorLine*"){ - Write-host "Exit by stop phrase" + Write-host "Exit by stop phrase" -ForegroundColor Green break } @@ -107,7 +114,7 @@ clone_script: [bool]$needexit = $false ForEach($line in $Res){ if ($line -like "*$ErrorLine*"){ - Write-host "Exit by stop phrase [obj]" + Write-host "Exit by stop phrase [obj]" -ForegroundColor Green $needexit = $true break } @@ -118,12 +125,12 @@ clone_script: } if(Wait-Job $Job -Timeout 5){ - Write-host "Exit by end job" + Write-host "Exit by end job" -ForegroundColor Green break } - if ([System.Environment]::TickCount-$JobTime -gt 600000) { - Write-host "Exit by timeout" + if ([System.Environment]::TickCount-$JobTime -gt 1000000) { + Write-host "Exit by timeout" -ForegroundColor Yellow break } } @@ -135,6 +142,7 @@ clone_script: ExecUpdate "update2" "C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null" "terminate?MSYS2" + Write-Host "Update " -NoNewLine Write-Host "[ OK ]" -ForegroundColor Green install: - ps: >- @@ -341,6 +349,7 @@ test_script: Remove-Job -Force $Job if(!$res){ + Write-host "--------------------- tests fail" -ForegroundColor Red $global:TestsPassed=$false } } @@ -364,11 +373,11 @@ test_script: #proxmark logic tests - ExecTest "proxmark help" "proxmark3 -h" {bash -lc 'cd ~/client;./proxmark3 -h | grep -q wait && echo Passed || echo Failed'} + ExecTest "proxmark help" "proxmark3 -h" {bash -lc 'cd ~/client;./proxmark3 -h | grep -q wait && echo passed || echo failed'} - ExecTest "proxmark help text ISO7816" "proxmark3 -t" {bash -lc 'cd ~/client;./proxmark3 -t 2>&1 | grep -q ISO7816 && echo Passed || echo Failed'} + ExecTest "proxmark help text ISO7816" "proxmark3 -t" {bash -lc 'cd ~/client;./proxmark3 -t | grep -q ISO7816 && echo passed || echo failed'} - ExecTest "proxmark help text hardnested" "proxmark3 -t" {bash -lc 'cd ~/client;./proxmark3 -t 2>&1 | grep -q hardnested && echo Passed || echo Failed'} + ExecTest "proxmark help text hardnested" "proxmark3 -t" {bash -lc 'cd ~/client;./proxmark3 -t | grep -q hardnested && echo passed || echo failed'} ExecTest "hf mf offline text" "hf mf" {bash -lc "cd ~/client;./proxmark3 -c 'hf mf'"} "at_enc"