vulkzample/test.sh
Rebekah Rowe a6c67dd91f
Initial Commit
This took alot of love to build.
It is build off of the combo of the Vulkan Tutorial and Sample files
from the vulkanHPP library.

The VulkanHPP Library appears compatible with the GPL license as per it
being the Apache 2 license.
2024-07-13 20:29:05 -04:00

37 lines
767 B
Bash

#!/bin/sh -e
unset ENABLE_DEBUG
unset ENABLE_SWRAST
export CMAKE_ENABLE_TESTS=ON
check_failure() {
if [ $? -ne 0 ]; then
echo "Test Failed: $1"
exit 1
fi
}
run_and_grep() {
OUTPUT=$($1 2>&1)
echo "$OUTPUT" | grep "Completed tests"
check_failure "$2"
echo "Test Success: $2"
}
echo "Testing Debug"
sh clean.sh
ENABLE_TESTS=1 ENABLE_DEBUG=1 sh build.sh >/dev/null 2>&1
check_failure "Build Debug"
time ENABLE_SWRAST=1 run_and_grep "sh run.sh" "Debug CPU Test"
time run_and_grep "sh run.sh" "Debug GPU Test"
echo "Testing Release"
sh clean.sh
ENABLE_TESTS=1 sh build.sh >/dev/null 2>&1
check_failure "Build Release"
time ENABLE_SWRAST=1 run_and_grep "sh run.sh" "Release CPU Test"
time run_and_grep "sh run.sh" "Release GPU Test"
echo "Tests Succeeded"