This commit is contained in:
chatlanin
2025-01-03 10:25:22 +03:00
parent 6b1e1f9d0e
commit 55917da5ee
50 changed files with 246 additions and 1680 deletions

24
run.sh
View File

@@ -4,16 +4,24 @@ PROJECT_NAME=$(basename $PWD)
run() {
command meson compile -C build
if [[ -z "$1" ]]; then
cd build
./tests/$PROJECT_NAME
cd ..
else
meson test $1 -C build
fi
cd build
./bin/$PROJECT_NAME
cd ..
}
if [ -d "build" ]; then
# run test [name_test]
# example: run test pattrens
if [ $1 = "test" ]; then
echo ""
meson test $2 -C build
echo ""
awk '/^-------------------------------------------------------------------------------/{flag=1} /===============================================================================/{flag=0} flag' ./build/meson-logs/testlog.txt
elif [ $1 = "tests" ]; then
echo ""
meson test -C build
echo ""
# awk '/^-------------------------------------------------------------------------------/{flag=1} /===============================================================================/{flag=0} flag' ./build/meson-logs/testlog.txt
elif [ -d "build" ]; then
run
else
command meson setup build