mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-27 09:21:56 +00:00
tests: Fix layer path
The wrapping test could silently fail if the layer path wasn't set. Change-Id: I6a8fae3da0e88281f346b8eb8aa4b762b149a785
This commit is contained in:
parent
f207daf0a2
commit
2fc185fc4b
@ -2,9 +2,12 @@
|
||||
|
||||
pushd $(dirname "$0") > /dev/null
|
||||
|
||||
vk_layer_path=$VK_LAYER_PATH:`pwd`/layers:../layers
|
||||
ld_library_path=$LD_LIBRARY_PATH:`pwd`/layers:../layers
|
||||
|
||||
# Check for insertion of wrap-objects layer.
|
||||
output=$(VK_LAYER_PATH=$VK_LAYER_PATH:`pwd`/layers \
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/layers \
|
||||
output=$(VK_LAYER_PATH=$vk_layer_path \
|
||||
LD_LIBRARY_PATH=$ld_library_path \
|
||||
VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_wrap_objects \
|
||||
VK_LOADER_DEBUG=all \
|
||||
GTEST_FILTER=WrapObjects.Insert \
|
||||
@ -30,8 +33,8 @@ fi
|
||||
echo "Insertion test PASSED"
|
||||
|
||||
# Check for insertion of wrap-objects layer in front.
|
||||
output=$(VK_LAYER_PATH=$VK_LAYER_PATH:`pwd`/layers \
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/layers \
|
||||
output=$(VK_LAYER_PATH=$vk_layer_path \
|
||||
LD_LIBRARY_PATH=$ld_library_path \
|
||||
VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_parameter_validation:VK_LAYER_LUNARG_wrap_objects \
|
||||
VK_LOADER_DEBUG=all \
|
||||
GTEST_FILTER=WrapObjects.Insert \
|
||||
@ -57,8 +60,8 @@ fi
|
||||
echo "Front insertion test PASSED"
|
||||
|
||||
# Check for insertion of wrap-objects layer in back.
|
||||
output=$(VK_LAYER_PATH=$VK_LAYER_PATH:`pwd`/layers \
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/layers \
|
||||
output=$(VK_LAYER_PATH=$vk_layer_path \
|
||||
LD_LIBRARY_PATH=$ld_library_path \
|
||||
VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_wrap_objects:VK_LAYER_LUNARG_parameter_validation \
|
||||
VK_LOADER_DEBUG=all \
|
||||
GTEST_FILTER=WrapObjects.Insert \
|
||||
@ -84,8 +87,8 @@ fi
|
||||
echo "Back insertion test PASSED"
|
||||
|
||||
# Check for insertion of wrap-objects layer in middle.
|
||||
output=$(VK_LAYER_PATH=$VK_LAYER_PATH:`pwd`/layers \
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/layers \
|
||||
output=$(VK_LAYER_PATH=$vk_layer_path \
|
||||
LD_LIBRARY_PATH=$ld_library_path \
|
||||
VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_core_validation:VK_LAYER_LUNARG_wrap_objects:VK_LAYER_LUNARG_parameter_validation \
|
||||
VK_LOADER_DEBUG=all \
|
||||
GTEST_FILTER=WrapObjects.Insert \
|
||||
@ -113,10 +116,12 @@ echo "Middle insertion test PASSED"
|
||||
# Run the layer validation tests with and without the wrap-objects layer. Diff the results.
|
||||
# Filter out the "Unexpected:" lines because they contain varying object handles.
|
||||
GTEST_PRINT_TIME=0 \
|
||||
VK_LAYER_PATH=$vk_layer_path \
|
||||
LD_LIBRARY_PATH=$ld_library_path \
|
||||
./vk_layer_validation_tests | grep -v "^Unexpected: " > unwrapped.out
|
||||
GTEST_PRINT_TIME=0 \
|
||||
VK_LAYER_PATH=$VK_LAYER_PATH:`pwd`/layers \
|
||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/layers \
|
||||
VK_LAYER_PATH=$vk_layer_path \
|
||||
LD_LIBRARY_PATH=$ld_library_path \
|
||||
VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_wrap_objects \
|
||||
./vk_layer_validation_tests | grep -v "^Unexpected: " > wrapped.out
|
||||
diff unwrapped.out wrapped.out
|
||||
|
Loading…
Reference in New Issue
Block a user