#!/bin/sh

# these tests are the one that run in spirv-reflect's CI on github
set -e

workdir="$(mktemp -d --tmpdir="$AUTOPKGTEST_TMP")"
mkdir -p wd
git clone -q -b main --depth 1 https://github.com/LunarG/SPIRV-Database.git ${workdir}

echo "run tests..."
python3 tests/ci_database.py --dir ${workdir}/vulkan/SaschaWillemsVulkan/
echo "test 1 OK"
python3 tests/ci_database.py --dir ${workdir}/vulkan/clspv/
echo "test 2 OK"
python3 tests/ci_database.py --dir ${workdir}/vulkan/dawn/
echo "test 3 OK"
python3 tests/ci_database.py --dir ${workdir}/vulkan/gl_cts/
echo "test 4 OK"
python3 tests/ci_database.py --dir ${workdir}/vulkan/naga/remaps/
echo "test 5 OK"
python3 tests/ci_database.py --dir ${workdir}/vulkan/tint/
echo "test 6 OK"
echo "run OK"
