Separate memory testing script and only generate Cmake dir if necessary.

This commit is contained in:
Drew Galbraith 2024-01-11 16:45:26 -08:00
parent 5f1053cf17
commit 1b18739403
2 changed files with 20 additions and 2 deletions

16
scripts/test-mem.sh Executable file
View File

@ -0,0 +1,16 @@
#! /bin/bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pushd "$DIR/.."
if [[ ! -e test-bin ]]; then
cmake -B test-bin/ -G Ninja -D enable_testing=on
fi
pushd test-bin/
ninja build_test
ctest --output-on-failure -T memcheck
popd
popd

View File

@ -5,10 +5,12 @@ set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pushd "$DIR/.."
cmake -B test-bin/ -G Ninja -D enable_testing=on
if [[ ! -e test-bin ]]; then
cmake -B test-bin/ -G Ninja -D enable_testing=on
fi
pushd test-bin/
ninja build_test
ctest --output-on-failure -T memcheck
ctest --output-on-failure
popd
popd