rca-umb's picture
Five Desks Code: tasks, calibration and source
e042d72 verified
Raw History Blame Contribute Delete
703 Bytes
set -u
pip install -q python-dateutil pytz text-unidecode freezegun 2>/dev/null
mkdir -p /tmp/src && cd /tmp/src
for f in /out/*.tar.gz; do tar xzf "$f"; done
for d in /tmp/src/*/; do
n=$(basename "$d")
t=$(find "$d" -path '*test*' -name '*.py' | wc -l)
src=$(find "$d" -name '*.py' -not -path '*test*' -not -path '*docs*' -not -name 'setup.py' -not -name 'conf.py' | xargs cat 2>/dev/null | wc -l)
start=$(date +%s.%N)
out=$(cd "$d" && PYTHONPATH="$d:$d/src" timeout 300 python -m pytest -q -x -p no:cacheprovider 2>&1 | tail -1)
end=$(date +%s.%N)
printf '%-28s testfiles=%-3s srclines=%-6s %6.1fs %s\n' "$n" "$t" "$src" "$(echo "$end - $start" | bc 2>/dev/null || echo 0)" "$out"
done