-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathsurvey_specs.sh
More file actions
executable file
·32 lines (27 loc) · 944 Bytes
/
Copy pathsurvey_specs.sh
File metadata and controls
executable file
·32 lines (27 loc) · 944 Bytes
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
#!/bin/bash
# Survey language spec compilation errors
echo "Surveying language spec compilation errors..."
echo "============================================="
echo
for spec in rubyspec/language/*.rb; do
name=$(basename "$spec")
# Skip specs that are known to pass
if [[ "$name" == "versions_spec.rb" || "$name" == "fixtures" ]]; then
continue
fi
result=$(./run_rubyspec "$spec" 2>&1 | head -50)
if echo "$result" | grep -q "✓ Compiled successfully"; then
status="PASS"
error=""
elif echo "$result" | grep -q "Compilation failed"; then
status="FAIL"
error=$(echo "$result" | grep -E "Parse error|Syntax error|Missing value|undefined method" | head -1 | sed 's/^.*: //')
else
status="CRASH"
error=$(echo "$result" | grep -E "Error|Exception" | head -1)
fi
printf "%-35s %s\n" "$name" "$status"
if [[ -n "$error" && ${#error} -lt 100 ]]; then
printf " └─ %s\n" "$error"
fi
done