1 # Be sure to run "Set-ExecutionPolicy RemoteSigned" before running powershell scripts 2 3 # Use TestExceptions to filter out tests with known problems, separated by a colon 4 # i.e. run_all_tests.ps1 -TestExceptions VkLayerTest.RequiredParameter:VkLayerTest.UnrecognizedValue 5 6 # To trigger Debug tests, specify the parameter with a hyphen 7 # i.e run_all_tests.ps1 -Debug 8 9 Param( 10 [switch]$Debug, 11 [string]$LoaderTestExceptions, 12 [string]$TestExceptions 13 ) 14 15 if ($Debug) { 16 $dPath = "Debug" 17 } else { 18 $dPath = "Release" 19 } 20 21 $AboveDir = (Get-Item -Path ".." -Verbose).FullName 22 Write-Host "Using Vulkan run-time=$AboveDir\loader\$dPath" 23 Set-Item -path env:Path -value ("$AboveDir\loader\$dPath;" + $env:Path) 24 Write-Host "Using VK_LAYER_PATH=$AboveDir\layers\$dPath" 25 $env:VK_LAYER_PATH = "$AboveDir\layers\$dPath" 26 27 & $dPath\vk_layer_validation_tests --gtest_filter=-$TestExceptions 28 if ($lastexitcode -ne 0) { 29 exit 1 30 } 31 32 exit $lastexitcode 33