# test_repro_gridprefs_cales.ps1 - rulare headless a repro-ului gridprefs.tmp vechi # (cAles/cSemafor pe grdFacturi, frm_import_efactura). # Rulare: powershell -ExecutionPolicy Bypass -File test_repro_gridprefs_cales.ps1 $ErrorActionPreference = 'Stop' $Teste = $PSScriptRoot $Prg = Join-Path $Teste 'test_repro_gridprefs_cales.prg' $Fxp = [IO.Path]::ChangeExtension($Prg, '.fxp') $Err = [IO.Path]::ChangeExtension($Prg, '.err') $Log = Join-Path $Teste 'test_repro_gridprefs_cales_log.txt' $Vfp = 'C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe' Remove-Item $Fxp, $Err, $Log -ErrorAction SilentlyContinue $p = Start-Process -FilePath $Vfp -ArgumentList '-A', '-T', "`"$Prg`"" -PassThru if (-not $p.WaitForExit(240000)) { $p.Kill() throw 'TIMEOUT: testul nu s-a terminat in 240s' } if (Test-Path $Err) { throw "Eroare de compilare: $(Get-Content $Err -Raw)" } if (-not (Test-Path $Log)) { throw "Lipseste logul $Log" } Get-Content $Log