fortrangoingonforty/facsimile / a85fba0

Browse files

test runner

Authored by espadonne
SHA
a85fba00e6e999db37dc3fc00921585373d02010
Parents
cf07f75
Tree
d725f5f

1 changed file

StatusFile+-
A run_tests.sh 48 0
run_tests.shadded
@@ -0,0 +1,48 @@
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 "========================================"