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]$TestExceptions
12 )
13 
14 if ($Debug) {
15     $dPath = "Debug"
16 } else {
17     $dPath = "Release"
18 }
19 
20 Set-Item -path env:Path -value ($env:Path + ";..\loader\$dPath")
21 Set-Item -path env:Path -value ($env:Path + ";gtest-1.7.0\$dPath")
22 $env:VK_LAYER_PATH = "..\layers\$dPath"
23 
24 & $dPath\vk_loader_validation_tests
25 if ($lastexitcode -ne 0) {
26    exit 1
27 }
28 
29 & $dPath\vk_layer_validation_tests --gtest_filter=-$TestExceptions
30 
31 exit $lastexitcode
32