#!/bin/bash
set -e

# this tests that libdxcompiler.so is reacheable by the built executable on an installed system.
dxc --help

# this test reflects what the CI does on github (and also build-time tests)
cmake -B build -G Ninja -DLLVM_PARALLEL_LINK_JOBS=1 \
            -DHLSL_OFFICIAL_BUILD=ON \
            -DLLVM_USE_LINKER=lld \
            -DCMAKE_BUILD_TYPE=Release \
            -C ./cmake/caches/PredefinedParams.cmake .

ninja -C build test-depends

# locales are required for a few UTF-8 conversions
locale-gen en_US.UTF-8

ninja -C build check-all
