light/tools/ci/amd64/gcc/unit_tests.sh

27 lines
571 B
Bash
Raw Normal View History

#!/bin/bash
set -e
cd $(git rev-parse --show-toplevel)/
rm -rf ./build && mkdir build/ && cd build
2025-09-10 14:26:08 +03:30
export CXX=$(which g++)
export CC=$(which gcc)
lshw -C display
vulkaninfo --summary
2025-09-21 14:15:33 +03:30
# gcc uses libstdc++ by default
cmake .. \
-G Ninja \
-DCMAKE_LINKER_TYPE=MOLD \
-DENABLE_UNIT_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
2025-09-21 14:15:33 +03:30
-DCMAKE_CXX_FLAGS="-std=c++23 -g -fno-omit-frame-pointer" \
&& cmake --build . -j `nproc`
2025-09-21 14:15:33 +03:30
for test in $(find ./ -type f -name '*_tests' -executable); do
echo "Running $test"
gdb -ex='set confirm off' -ex='run' -ex='bt' -ex='quit' "$test"
done