1$dxil_dll = cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 -no_logo && where dxil.dll" 2>&1
2if ($dxil_dll -notmatch "dxil.dll$") {
3    Write-Output "Couldn't get path to dxil.dll"
4    exit 1
5}
6$env:Path = "$(Split-Path $dxil_dll);$env:Path"
7
8# VK_ICD_FILENAMES environment variable is not used when running with
9# elevated privileges. Add a key to the registry instead.
10$hkey_path = "HKLM:\SOFTWARE\Khronos\Vulkan\Drivers\"
11$hkey_name = Join-Path -Path $pwd -ChildPath "_install\share\vulkan\icd.d\dzn_icd.x86_64.json"
12New-Item -Path $hkey_path -force
13New-ItemProperty -Path $hkey_path -Name $hkey_name -Value 0 -PropertyType DWORD
14
15$results = New-Item -ItemType Directory results
16$baseline = ".\_install\warp-fails.txt"
17$suite = ".\_install\deqp-dozen.toml"
18
19$env:DZN_DEBUG = "warp"
20$env:MESA_VK_IGNORE_CONFORMANCE_WARNING = "true"
21deqp-runner suite --suite $($suite) --output $($results) --baseline $($baseline) --testlog-to-xml C:\deqp\executor\testlog-to-xml.exe --jobs 4 --fraction 3
22$deqpstatus = $?
23
24$template = "See https://$($env:CI_PROJECT_ROOT_NAMESPACE).pages.freedesktop.org/-/$($env:CI_PROJECT_NAME)/-/jobs/$($env:CI_JOB_ID)/artifacts/results/{{testcase}}.xml"
25deqp-runner junit --testsuite dEQP --results "$($results)/failures.csv" --output "$($results)/junit.xml" --limit 50 --template $template
26Copy-Item -Path "C:\deqp\testlog.css" -Destination $($results)
27Copy-Item -Path "C:\deqp\testlog.xsl" -Destination $($results)
28
29if (!$deqpstatus) {
30    Exit 1
31}
32