1bf215546Sopenharmony_ci$env:PIGLIT_NO_FAST_SKIP = 1
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_ciCopy-Item -Path _install\bin\opengl32.dll -Destination C:\Piglit\lib\piglit\bin\opengl32.dll
4bf215546Sopenharmony_ciCopy-Item -Path _install\bin\libgallium_wgl.dll -Destination C:\Piglit\lib\piglit\bin\libgallium_wgl.dll
5bf215546Sopenharmony_ciCopy-Item -Path _install\bin\libglapi.dll -Destination C:\Piglit\lib\piglit\bin\libglapi.dll
6bf215546Sopenharmony_ci
7bf215546Sopenharmony_ci# Run this using VsDevCmd.bat to ensure DXIL.dll is in %PATH%
8bf215546Sopenharmony_cicmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && py -3 C:\Piglit\bin\piglit.py run `"$env:PIGLIT_PROFILE`" $env:PIGLIT_OPTIONS $env:PIGLIT_TESTS .\results"
9bf215546Sopenharmony_ci
10bf215546Sopenharmony_cipy -3 C:\Piglit\bin\piglit.py summary console .\results | Select -SkipLast 1 | Select-String -NotMatch -Pattern ': pass' | Set-Content -Path .\result.txt
11bf215546Sopenharmony_ci
12bf215546Sopenharmony_ci$reference = Get-Content ".\_install\$env:PIGLIT_RESULTS.txt"
13bf215546Sopenharmony_ci$result = Get-Content .\result.txt
14bf215546Sopenharmony_ciif (-Not ($reference -And $result)) {
15bf215546Sopenharmony_ci  Exit 1
16bf215546Sopenharmony_ci}
17bf215546Sopenharmony_ci
18bf215546Sopenharmony_ci$diff = Compare-Object -ReferenceObject $reference -DifferenceObject $result
19bf215546Sopenharmony_ciif (-Not $diff) {
20bf215546Sopenharmony_ci  Exit 0
21bf215546Sopenharmony_ci}
22bf215546Sopenharmony_ci
23bf215546Sopenharmony_cipy -3 C:\Piglit\bin\piglit.py summary html --exclude-details=pass .\summary .\results
24bf215546Sopenharmony_ci
25bf215546Sopenharmony_ciWrite-Host "Unexpected change in results:"
26bf215546Sopenharmony_ciWrite-Output $diff | Format-Table -Property SideIndicator,InputObject -Wrap
27bf215546Sopenharmony_ci
28bf215546Sopenharmony_ciExit 1
29