Simplifies sharing code among python modules, keeps everything together.
- Moved python scripts out of layers dir into scripts dir
- Updated relative paths for input/output files in layers dir
- Updated doc validation tests to use correct paths
Change-Id: I57e6ad6f551d4fb652583315fe3dccb23b187db1
#############################
-out_filename = "vk_validation_error_messages.h" # can override w/ '-out <filename>' option
-db_filename = "vk_validation_error_database.txt" # can override w/ '-gendb <filename>' option
+out_filename = "../layers/vk_validation_error_messages.h" # can override w/ '-out <filename>' option
+db_filename = "../layers/vk_validation_error_database.txt" # can override w/ '-gendb <filename>' option
json_filename = None # con pass in w/ '-json <filename> option
gen_db = False # set to True when '-gendb <filename>' option provided
json_compare = False # compare existing DB to json file input
# 2. Could use notes to store custom fields (like TODO) and print those out here
# 3. Update test code to check if tests use new, unique enums to check for errors instead of strings
-db_file = 'vk_validation_error_database.txt'
+db_file = '../layers/vk_validation_error_database.txt'
layer_source_files = [
-'core_validation.cpp',
-'descriptor_sets.cpp',
-'parameter_validation.cpp',
-'object_tracker.cpp',
-'shader_validation.cpp',
-'buffer_validation.cpp',
+'../layers/core_validation.cpp',
+'../layers/descriptor_sets.cpp',
+'../layers/parameter_validation.cpp',
+'../layers/object_tracker.cpp',
+'../layers/shader_validation.cpp',
+'../layers/buffer_validation.cpp',
]
-header_file = 'vk_validation_error_messages.h'
+header_file = '../layers/vk_validation_error_messages.h'
# TODO : Don't hardcode linux path format if we want this to run on windows
test_file = '../tests/layer_validation_tests.cpp'
# List of enums that are allowed to be used more than once so don't warn on their duplicates
# cd C:\src\Vulkan-LoaderAndValidationLayers\build\tests
# .\vkvalidatelayerdoc.ps1 [-Debug]
-if (-not (Test-Path -LiteralPath '..\..\layers')) {
+if (-not (Test-Path -LiteralPath '..\..\scripts')) {
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"
+ write-host " vk_validation_stats.py from the 'scripts' dir of your source tree"
exit 0
}
write-host -background black -foreground green "[ RUN ] " -nonewline
write-host "vkvalidatelayerdoc.ps1: Validate layer documentation"
-# Run doc validation from project layers dir
-push-location ..\..\layers
+# Run doc validation from project scripts dir
+push-location ..\..\scripts
# Validate that layer documentation matches source contents
python vk_validation_stats.py $output_mode
NC=''
fi
# If we can't find the source dir then skip
-if [ ! -d "../../layers" ]; then
+if [ ! -d "../../scripts" ]; 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"
+ printf " vk_validation_stats.py from the 'scripts' dir of your source tree\n"
exit
fi
printf "$GREEN[ RUN ]$NC $0\n"
-# Run doc validation from project layers dir
-pushd ../../layers
+# Run doc validation from project scripts dir
+pushd ../../scripts
# Validate that layer database matches source contents
python vk_validation_stats.py $1