gemstone/run-check-test.sh

42 lines
1.0 KiB
Bash
Raw Permalink Normal View History

#!/usr/bin/env sh
# Author: Sven Vogel
# Created: 02.05.2024
# Description: Builds the project and runs tests
# Returns 0 on success and 1 when something went wrong
echo "+--------------------------------------+"
echo "| BUILDING all TARGETS |"
echo "+--------------------------------------+"
2024-05-18 10:25:13 +00:00
cmake .
make -B
if [ ! $? -eq 0 ]; then
echo "===> failed to build targets"
exit 1
fi
echo "+--------------------------------------+"
echo "| RUNNING CODE CHECK |"
echo "+--------------------------------------+"
make check
if [ ! $? -eq 0 ]; then
echo "===> failed code check..."
exit 1
fi
echo "+--------------------------------------+"
echo "| RUNNING TESTS |"
echo "+--------------------------------------+"
ctest -VV --output-on-failure --schedule-random -j 4
if [ ! $? -eq 0 ]; then
echo "===> failed tests..."
exit 1
fi
echo "+--------------------------------------+"
echo "| COMPLETED CHECK + TESTS SUCCESSFULLY |"
echo "+--------------------------------------+"