added new bash validation scripts
This commit is contained in:
38
surnames_quick_validation.sh
Normal file
38
surnames_quick_validation.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
# quick_validation.sh - Simplified version for rapid testing
|
||||
|
||||
echo "=== Quick Surname Validation ==="
|
||||
|
||||
# Quick output comparison
|
||||
echo "Generating results..."
|
||||
gunzip -c dblp.xml.gz | ./surnames > c_quick.txt &
|
||||
C_PID=$!
|
||||
gunzip -c dblp.xml.gz | python3 surnames.py > python_quick.txt &
|
||||
PYTHON_PID=$!
|
||||
|
||||
wait $C_PID $PYTHON_PID
|
||||
|
||||
echo "C results: $(wc -l < c_quick.txt) surnames"
|
||||
echo "Python results: $(wc -l < python_quick.txt) surnames"
|
||||
|
||||
echo "Wang comparison:"
|
||||
echo "C: $(grep "^Wang " c_quick.txt)"
|
||||
echo "Python: $(grep "^Wang " python_quick.txt)"
|
||||
|
||||
if diff -q c_quick.txt python_quick.txt > /dev/null; then
|
||||
echo "✓ Results identical!"
|
||||
else
|
||||
echo "⚠ Results differ"
|
||||
fi
|
||||
|
||||
# Quick memory check
|
||||
echo "Memory check:"
|
||||
gunzip -c dblp.xml.gz | valgrind --leak-check=yes ./surnames > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ No major memory issues"
|
||||
else
|
||||
echo "⚠ Check valgrind output"
|
||||
fi
|
||||
|
||||
rm -f c_quick.txt python_quick.txt
|
||||
|
Reference in New Issue
Block a user