1 # Powershell script for running the vktrace trace/replay auto test
2 # To run this test:
3 #    cd <this-dir>
4 #    powershell C:\src\LoaderAndTools\vktracereplay.ps1 [-Debug]
5 
6 if ($args[0] -eq "-Debug") {
7     $dPath = "Debug"
8 } else {
9     $dPath = "Release"
10 }
11 
12 write-host -background black -foreground green "[  RUN     ] " -nonewline
13 write-host "vkvalidatelayerdoc.ps1: Validate layer documentation"
14 
15 # Run doc validation from project root dir
16 push-location ..\..
17 
18 # Validate that layer documentation matches source contents
19 python vk_layer_documentation_generate.py --validate
20 
21 # Report result based on exit code
22 if (!$LASTEXITCODE) {
23     write-host -background black -foreground green "[  PASSED  ] " -nonewline;
24     $exitstatus = 0
25 } else {
26     echo 'Validation of vk_validation_layer_details.md failed'
27     write-host -background black -foreground red "[  FAILED  ] "  -nonewline;
28     echo '1 FAILED TEST'
29     $exitstatus = 1
30 }
31 
32 pop-location
33 exit $exitstatus
34