Page MenuHomec4science

run_tests.sh
No OneTemporary

File Metadata

Created
Wed, Sep 25, 03:52

run_tests.sh

#!/bin/bash
n_tests=0
passed_tests=0
for test_file in test_*.py; do
((n_tests++))
echo "Testing $test_file"
echo -n "------------ "
python $test_file >/dev/null 2>&1
result=$?
if [ $result -ne 0 ]; then
echo "failure"
else
echo "success"
((passed_tests++))
fi
done
python test_fractal.py 2>/dev/null | tail -n 19 > test_fractal.out 2>&1
diff test_fractal.out test_fractal.verified >/dev/null 2>&1
result=$?
if [ $result -ne 0 ]; then
echo ""
echo "test_fractal.py diff failed"
((passed_tests--))
fi
rm test_fractal.out
failed_tests=$((n_tests - passed_tests))
echo ""
echo "Test results :"
echo " - passed $passed_tests/$n_tests"
echo " - failed $failed_tests/$n_tests"

Event Timeline