-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
Β·54 lines (43 loc) Β· 1.39 KB
/
test.sh
File metadata and controls
executable file
Β·54 lines (43 loc) Β· 1.39 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
50
51
52
53
54
#!/bin/bash
set -e
# Test script for sqlite-delta patterns
# Discovers and runs all pattern.py files in the patterns/ directory
echo "π§ͺ Running sqlite-delta pattern tests..."
echo
# Find all pattern.py files in the patterns directory
pattern_files=$(find patterns -name "pattern.py" -type f | sort)
if [ -z "$pattern_files" ]; then
echo "β No pattern.py files found in patterns/ directory"
exit 1
fi
# Track test results
total_patterns=0
passed_patterns=0
# Run each pattern test
for pattern_file in $pattern_files; do
pattern_name=$(dirname "$pattern_file" | sed 's|patterns/||')
echo "π Testing pattern: $pattern_name"
echo " File: $pattern_file"
total_patterns=$((total_patterns + 1))
# Run the pattern with uv
if uv run python "$pattern_file"; then
echo "β
$pattern_name: PASSED"
passed_patterns=$((passed_patterns + 1))
else
echo "β $pattern_name: FAILED"
fi
echo
done
# Summary
echo "ββββββββββββββββββββββββββββββββββββββββ"
echo "π Test Summary:"
echo " Total patterns: $total_patterns"
echo " Passed: $passed_patterns"
echo " Failed: $((total_patterns - passed_patterns))"
if [ $passed_patterns -eq $total_patterns ]; then
echo "π All tests passed!"
exit 0
else
echo "π₯ Some tests failed!"
exit 1
fi