Initial FrameAssistant baseline from the vrdashboard template
Template stripped to the overlay platform (examples, demo UI and Frame test package removed), renamed to FrameAssistant, and working rules for the project recorded in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds and runs all tests in a Debian container with BOTH render backends, Vulkan with the
|
||||
# Khronos validation layers enabled. Fails on any validation message.
|
||||
#
|
||||
# scripts/container-test.sh GPU via /dev/dri if available, otherwise software
|
||||
# VK_DRIVER=lvp scripts/container-test.sh force lavapipe (software Vulkan)
|
||||
set -euo pipefail
|
||||
|
||||
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
engine="${CONTAINER_ENGINE:-$(command -v podman || command -v docker)}"
|
||||
"$engine" build -q -t frameassistant-build-native -f "$root/docker/native.Dockerfile" "$root/docker" >/dev/null
|
||||
"$engine" build -q -t frameassistant-test -f "$root/docker/test.Dockerfile" "$root/docker" >/dev/null
|
||||
|
||||
run=("$engine" run --rm -v "$root:$root:z" -w "$root" -e HOME=/tmp -e "VK_DRIVER=${VK_DRIVER:-}")
|
||||
if [[ "$(basename "$engine")" == docker ]]; then
|
||||
run+=(--user "$(id -u):$(id -g)")
|
||||
else
|
||||
run+=(--userns=keep-id)
|
||||
fi
|
||||
[[ -e /dev/dri/renderD128 ]] && run+=(--device /dev/dri/renderD128)
|
||||
|
||||
"${run[@]}" frameassistant-test bash -c '
|
||||
set -e
|
||||
cmake -S . -B build/container-test -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVRDASH_VULKAN=ON >/dev/null
|
||||
cmake --build build/container-test
|
||||
if [[ -n "$VK_DRIVER" ]]; then export VK_DRIVER_FILES=/usr/share/vulkan/icd.d/${VK_DRIVER}_icd.json; fi
|
||||
vulkaninfo --summary 2>/dev/null | grep -m1 deviceName || true
|
||||
Xvfb :99 >/dev/null 2>&1 &
|
||||
sleep 1
|
||||
export DISPLAY=:99 VRDASH_VULKAN_VALIDATION=1
|
||||
ctest --test-dir build/container-test --output-on-failure -V > build/container-test/ctest.log 2>&1 \
|
||||
|| { tail -40 build/container-test/ctest.log; exit 1; }
|
||||
grep -E "tests passed|Test +#" build/container-test/ctest.log
|
||||
messages=$(grep -oE "(VUID|UNASSIGNED)-[A-Za-z0-9_.-]+" build/container-test/ctest.log | sort | uniq -c || true)
|
||||
if [[ -n "$messages" ]]; then
|
||||
echo "Vulkan validation messages (see build/container-test/ctest.log):"
|
||||
echo "$messages"
|
||||
exit 1
|
||||
fi
|
||||
echo "No Vulkan validation messages."
|
||||
'
|
||||
Reference in New Issue
Block a user