blob: 323a03155f452c478816f19ddc2eba31abc27f95 [file] [log] [blame]
Tobin Ehlisc2b4e5e2016-12-08 11:25:34 -07001# Powershell script for running validating the layer database file
Mark Lobodzinski5a3af422016-06-09 13:25:20 -06002# To run this test:
3# From a Windows powershell:
4# cd C:\src\Vulkan-LoaderAndValidationLayers\build\tests
5# .\vkvalidatelayerdoc.ps1 [-Debug]
6
7if ($args[0] -eq "-Debug") {
8 $dPath = "Debug"
9} else {
10 $dPath = "Release"
11}
12
13write-host -background black -foreground green "[ RUN ] " -nonewline
14write-host "vkvalidatelayerdoc.ps1: Validate layer documentation"
15
Tobin Ehlisc2b4e5e2016-12-08 11:25:34 -070016# Run doc validation from project layers dir
17push-location ..\..\layers
Mark Lobodzinski5a3af422016-06-09 13:25:20 -060018
19# Validate that layer documentation matches source contents
Tobin Ehlisc2b4e5e2016-12-08 11:25:34 -070020python vk_validation_stats.py
Mark Lobodzinski5a3af422016-06-09 13:25:20 -060021
22# Report result based on exit code
23if (!$LASTEXITCODE) {
24 write-host -background black -foreground green "[ PASSED ] " -nonewline;
25 $exitstatus = 0
26} else {
Tobin Ehlisc2b4e5e2016-12-08 11:25:34 -070027 echo 'Validation of vk_validation_error_database.txt failed'
Mark Lobodzinski5a3af422016-06-09 13:25:20 -060028 write-host -background black -foreground red "[ FAILED ] " -nonewline;
29 echo '1 FAILED TEST'
30 $exitstatus = 1
31}
32
33pop-location
34exit $exitstatus