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