diff options
-rwxr-xr-x | tests/_run_all_tests.ps1 | 70 | ||||
-rw-r--r-- | tests/_vkvalidatelayerdoc.ps1 | 68 |
2 files changed, 69 insertions, 69 deletions
diff --git a/tests/_run_all_tests.ps1 b/tests/_run_all_tests.ps1 index f0a5059a2..0dc014bf1 100755 --- a/tests/_run_all_tests.ps1 +++ b/tests/_run_all_tests.ps1 @@ -1,35 +1,35 @@ -# Be sure to run "Set-ExecutionPolicy RemoteSigned" before running powershell scripts
-
-# Use TestExceptions to filter out tests with known problems, separated by a colon
-# i.e. run_all_tests.ps1 -TestExceptions VkLayerTest.RequiredParameter:VkLayerTest.UnrecognizedValue
-
-# To trigger Debug tests, specify the parameter with a hyphen
-# i.e run_all_tests.ps1 -Debug
-
-Param(
- [switch]$Debug,
- [string]$TestExceptions
-)
-
-if ($Debug) {
- $dPath = "Debug"
-} else {
- $dPath = "Release"
-}
-
-Set-Item -path env:Path -value ($env:Path + ";..\loader\$dPath")
-Set-Item -path env:Path -value ($env:Path + ";gtest-1.7.0\$dPath")
-$env:VK_LAYER_PATH = "..\layers\$dPath"
-
-& $dPath\vk_loader_validation_tests
-if ($lastexitcode -ne 0) {
- exit 1
-}
-
-& $dPath\vk_layer_validation_tests --gtest_filter=-$TestExceptions
-if ($lastexitcode -ne 0) {
- exit 1
-}
-
-.\vkvalidatelayerdoc.ps1
-exit $lastexitcode
+# Be sure to run "Set-ExecutionPolicy RemoteSigned" before running powershell scripts + +# Use TestExceptions to filter out tests with known problems, separated by a colon +# i.e. run_all_tests.ps1 -TestExceptions VkLayerTest.RequiredParameter:VkLayerTest.UnrecognizedValue + +# To trigger Debug tests, specify the parameter with a hyphen +# i.e run_all_tests.ps1 -Debug + +Param( + [switch]$Debug, + [string]$TestExceptions +) + +if ($Debug) { + $dPath = "Debug" +} else { + $dPath = "Release" +} + +Set-Item -path env:Path -value ($env:Path + ";..\loader\$dPath") +Set-Item -path env:Path -value ($env:Path + ";gtest-1.7.0\$dPath") +$env:VK_LAYER_PATH = "..\layers\$dPath" + +& $dPath\vk_loader_validation_tests +if ($lastexitcode -ne 0) { + exit 1 +} + +& $dPath\vk_layer_validation_tests --gtest_filter=-$TestExceptions +if ($lastexitcode -ne 0) { + exit 1 +} + +.\vkvalidatelayerdoc.ps1 +exit $lastexitcode diff --git a/tests/_vkvalidatelayerdoc.ps1 b/tests/_vkvalidatelayerdoc.ps1 index 071088e19..39351dc6f 100644 --- a/tests/_vkvalidatelayerdoc.ps1 +++ b/tests/_vkvalidatelayerdoc.ps1 @@ -1,34 +1,34 @@ -# Powershell script for running the layer validation details doc validator
-# To run this test:
-# From a Windows powershell:
-# cd C:\src\Vulkan-LoaderAndValidationLayers\build\tests
-# .\vkvalidatelayerdoc.ps1 [-Debug]
-
-if ($args[0] -eq "-Debug") {
- $dPath = "Debug"
-} else {
- $dPath = "Release"
-}
-
-write-host -background black -foreground green "[ RUN ] " -nonewline
-write-host "vkvalidatelayerdoc.ps1: Validate layer documentation"
-
-# Run doc validation from project root dir
-push-location ..\..
-
-# Validate that layer documentation matches source contents
-python vk_layer_documentation_generate.py --validate
-
-# Report result based on exit code
-if (!$LASTEXITCODE) {
- write-host -background black -foreground green "[ PASSED ] " -nonewline;
- $exitstatus = 0
-} else {
- echo 'Validation of vk_validation_layer_details.md failed'
- write-host -background black -foreground red "[ FAILED ] " -nonewline;
- echo '1 FAILED TEST'
- $exitstatus = 1
-}
-
-pop-location
-exit $exitstatus
+# Powershell script for running the layer validation details doc validator +# To run this test: +# From a Windows powershell: +# cd C:\src\Vulkan-LoaderAndValidationLayers\build\tests +# .\vkvalidatelayerdoc.ps1 [-Debug] + +if ($args[0] -eq "-Debug") { + $dPath = "Debug" +} else { + $dPath = "Release" +} + +write-host -background black -foreground green "[ RUN ] " -nonewline +write-host "vkvalidatelayerdoc.ps1: Validate layer documentation" + +# Run doc validation from project root dir +push-location ..\.. + +# Validate that layer documentation matches source contents +python vk_layer_documentation_generate.py --validate + +# Report result based on exit code +if (!$LASTEXITCODE) { + write-host -background black -foreground green "[ PASSED ] " -nonewline; + $exitstatus = 0 +} else { + echo 'Validation of vk_validation_layer_details.md failed' + write-host -background black -foreground red "[ FAILED ] " -nonewline; + echo '1 FAILED TEST' + $exitstatus = 1 +} + +pop-location +exit $exitstatus |