From 4eaff8dba72f78f8820f003d5a2ac322b549f851 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 11 Dec 2020 10:22:03 +0100 Subject: [PATCH] .gitlab-ci: verify that Get-Content worked This will hopefully prevent future breakages similar to what the previous commit fixed. Reviewed-by: Daniel Stone Part-of: --- .gitlab-ci/windows/piglit_run.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/windows/piglit_run.ps1 b/.gitlab-ci/windows/piglit_run.ps1 index 705d8bdf20b..f62bb2c12c7 100644 --- a/.gitlab-ci/windows/piglit_run.ps1 +++ b/.gitlab-ci/windows/piglit_run.ps1 @@ -7,8 +7,13 @@ cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd6 py -3 C:\Piglit\bin\piglit.py summary console .\results | Select -SkipLast 1 | Select-String -NotMatch -Pattern ': pass' | Set-Content -Path .\result.txt -$diff = Compare-Object -ReferenceObject $(Get-Content ".\_install\$env:PIGLIT_PROFILE.txt") ` - -DifferenceObject $(Get-Content .\result.txt) +$reference = Get-Content ".\_install\$env:PIGLIT_PROFILE.txt" +$result = Get-Content .\result.txt +if (-Not ($reference -And $result)) { + Exit 1 +} + +$diff = Compare-Object -ReferenceObject $reference -DifferenceObject $result if (-Not $diff) { Exit 0 }