Fixes #1878
If vkvalidatelayerdoc script is not run from a directly two levels
below the layer source, then just skip running it. Print out a message
on how to run doc validation manually for those interested.
& $dPath\vk_layer_validation_tests --gtest_filter=-$TestExceptions
-# & .\vkvalidatelayerdoc.ps1 terse_mode
+& .\vkvalidatelayerdoc.ps1 terse_mode
exit $lastexitcode
# cd C:\src\Vulkan-LoaderAndValidationLayers\build\tests
# .\vkvalidatelayerdoc.ps1 [-Debug]
+if (-not (Test-Path -LiteralPath '..\..\layers')) {
+ write-host -background black -foreground green "[ SKIPPED ] " -nonewline
+ write-host "vkvalidatelayerdoc.ps1: Validate layer documentation"
+ write-host " To run validation DB checks you can manually execute"
+ write-host " vk_validation_stats.py from the 'layers' dir of your source tree"
+ exit 0
+}
+
if ($args[0] -eq "-Debug") {
$dPath = "Debug"
} else {
./run_loader_tests.sh
# Verify that validation checks in source match documentation
-#./vkvalidatelayerdoc.sh terse_mode
+./vkvalidatelayerdoc.sh terse_mode
# vk_layer_validation_tests check to see that validation layers will
# catch the errors that they are supposed to by intentionally doing things
#!/bin/bash
#set -x
+
if [ -t 1 ] ; then
RED='\033[0;31m'
GREEN='\033[0;32m'
GREEN=''
NC=''
fi
+# If we can't find the source dir then skip
+if [ ! -d "../../layers" ]; then
+ printf "$GREEN[ SKIPPED ]$NC $0\n"
+ printf " To run validation DB checks you can manually execute\n"
+ printf " vk_validation_stats.py from the 'layers' dir of your source tree\n"
+ exit
+fi
printf "$GREEN[ RUN ]$NC $0\n"