gwatch/autotest.sh

24 lines
516 B
Bash
Executable File

#!/bin/bash
# autotest.sh - Automated testing script for gwatch
GWATCH_TESTS="./build/gwatch_tests"
BUILD_DIR="./build"
# Check if test suite is compiled, compile if needed
if [ ! -f "$GWATCH_TESTS" ]; then
if [ ! -d "$BUILD_DIR" ]; then
echo "Error: $BUILD_DIR directory not found"
exit 1
fi
cd "$BUILD_DIR"
cmake --preset debug .. && make gwatch_tests
if [ $? -ne 0 ]; then
echo "Error: Failed to compile test suite"
exit 1
fi
cd ..
fi
$GWATCH_TESTS