Bash · 1173 bytes Raw Blame History
1 #!/bin/bash
2 #
3 # Test runner for FACSIMILE editor
4 #
5
6 set -e
7
8 echo "========================================"
9 echo "FACSIMILE Test Suite"
10 echo "========================================"
11
12 # Build the project
13 echo "Building FACSIMILE..."
14 fpm build --profile debug
15
16 # Run Fortran unit tests
17 echo ""
18 echo "Running Fortran Unit Tests..."
19 echo "----------------------------------------"
20
21 if fpm test; then
22 echo "✓ Fortran tests passed"
23 else
24 echo "✗ Fortran tests failed"
25 exit 1
26 fi
27
28 # Check if Python and pexpect are available for integration tests
29 if command -v python3 &> /dev/null; then
30 if python3 -c "import pexpect" 2>/dev/null; then
31 echo ""
32 echo "Running Integration Tests..."
33 echo "----------------------------------------"
34 python3 test/integration_test.py
35 else
36 echo ""
37 echo "⚠ Skipping integration tests (pexpect not installed)"
38 echo " Install with: pip3 install pexpect"
39 fi
40 else
41 echo ""
42 echo "⚠ Skipping integration tests (Python 3 not found)"
43 fi
44
45 echo ""
46 echo "========================================"
47 echo "Test run complete"
48 echo "========================================"