-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_all_tests.sh
More file actions
executable file
·49 lines (41 loc) · 1.02 KB
/
run_all_tests.sh
File metadata and controls
executable file
·49 lines (41 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
echo "Building LeanTest..."
lake build
echo ""
echo "Running all tests..."
echo ""
TOTAL_TESTS=0
FAILED=0
run_test() {
local test_name=$1
local test_file=$2
echo "=== Running $test_name ==="
if lake env lean --run "$test_file"; then
echo "✅ $test_name passed"
else
echo "❌ $test_name failed"
FAILED=$((FAILED + 1))
fi
echo ""
TOTAL_TESTS=$((TOTAL_TESTS + 1))
}
run_test "BasicTest" "examples/BasicTest.lean"
run_test "CollectionTest" "examples/CollectionTest.lean"
run_test "CustomMessageTest" "examples/CustomMessageTest.lean"
run_test "StackTest" "examples/StackTest.lean"
run_test "AdvancedAssertionsTest" "examples/AdvancedAssertionsTest.lean"
echo "================================"
echo "Test Summary"
echo "================================"
echo "Total test suites: $TOTAL_TESTS"
echo "Passed: $((TOTAL_TESTS - FAILED))"
echo "Failed: $FAILED"
echo ""
if [ $FAILED -eq 0 ]; then
echo "✅ All test suites passed!"
exit 0
else
echo "❌ Some test suites failed!"
exit 1
fi