Tobin Ehlis | c2b4e5e | 2016-12-08 11:25:34 -0700 | [diff] [blame] | 1 | # Powershell script for running validating the layer database file |
Mark Lobodzinski | 5a3af42 | 2016-06-09 13:25:20 -0600 | [diff] [blame] | 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 | |
Tobin Ehlis | c2b4e5e | 2016-12-08 11:25:34 -0700 | [diff] [blame] | 16 | # Run doc validation from project layers dir |
| 17 | push-location ..\..\layers |
Mark Lobodzinski | 5a3af42 | 2016-06-09 13:25:20 -0600 | [diff] [blame] | 18 | |
| 19 | # Validate that layer documentation matches source contents |
Tobin Ehlis | c2b4e5e | 2016-12-08 11:25:34 -0700 | [diff] [blame] | 20 | python vk_validation_stats.py |
Mark Lobodzinski | 5a3af42 | 2016-06-09 13:25:20 -0600 | [diff] [blame] | 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 { |
Tobin Ehlis | c2b4e5e | 2016-12-08 11:25:34 -0700 | [diff] [blame] | 27 | echo 'Validation of vk_validation_error_database.txt failed' |
Mark Lobodzinski | 5a3af42 | 2016-06-09 13:25:20 -0600 | [diff] [blame] | 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 |