You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Revise run-and-email scripts.
This commit is contained in:
@@ -27,30 +27,33 @@ for VERSION in $PYVERSIONS ; do
|
||||
typeset -i rc=0
|
||||
LOGFILE=/tmp/pyenvlib-$VERSION-$$.log
|
||||
|
||||
if [[ $VERSION == '3.5.9' ]] ; then
|
||||
case "$VERSION" in
|
||||
3.7.6 | 3.8.1 | 3.1.5 | 3.0.1 )
|
||||
continue
|
||||
;;
|
||||
3.5.9 )
|
||||
MAX_TESTS=237 # We start failing on "mailbox" at 238
|
||||
elif [[ $VERSION == '3.2.6' ]] ; then
|
||||
;;
|
||||
3.2.6 )
|
||||
MAX_TESTS=172 # We start failing on pkgutil.py
|
||||
elif [[ $VERSION == '3.3.7' ]] ; then
|
||||
;;
|
||||
3.3.7 )
|
||||
MAX_TESTS=180 # We start failing on pkgutil.py
|
||||
elif [[ $VERSION == '3.4.10' ]] ; then
|
||||
;;
|
||||
3.4.10 )
|
||||
MAX_TESTS=30 # We start failing on aifc
|
||||
elif [[ $VERSION == '3.6.9' ]] ; then
|
||||
;;
|
||||
3.6.9 )
|
||||
MAX_TESTS=92 # We start failing on cgiltb.py
|
||||
elif [[ $VERSION == '3.7.6' ]] ; then
|
||||
continue
|
||||
elif [[ $VERSION == '3.8.1' ]] ; then
|
||||
continue
|
||||
elif [[ $VERSION == '3.1.5' ]] ; then
|
||||
continue
|
||||
elif [[ $VERSION == '3.0.1' ]] ; then
|
||||
continue
|
||||
elif [[ $VERSION == '2.6.9' ]] ; then
|
||||
;;
|
||||
2.6.9 )
|
||||
MAX_TESTS=1300
|
||||
continue
|
||||
else
|
||||
;;
|
||||
* )
|
||||
MAX_TESTS=800
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
actual_versions="$actual_versions $VERSION"
|
||||
|
||||
if ! pyenv local $VERSION ; then
|
||||
|
@@ -1,16 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
function displaytime {
|
||||
printf "ran in "
|
||||
local T=$1
|
||||
local D=$((T/60/60/24))
|
||||
local H=$((T/60/60%24))
|
||||
local M=$((T/60%60))
|
||||
local S=$((T%60))
|
||||
(( $D > 0 )) && printf '%d days ' $D
|
||||
(( $H > 0 )) && printf '%d hours ' $H
|
||||
(( $M > 0 )) && printf '%d minutes ' $M
|
||||
(( $D > 0 || $H > 0 || $M > 0 )) && printf 'and '
|
||||
printf '%d seconds\n' $S
|
||||
}
|
||||
|
||||
. ../../admin-tools/pyenv-newer-versions
|
||||
|
||||
USER=${USER:-rocky}
|
||||
EMAIL=${EMAIL:-rb@dustyfeet.com}
|
||||
SUBJECT_PREFIX="stdlib unit testing for"
|
||||
for VERSION in 2.6.9 2.7.17 3.4.10 3.5.9 3.6.9 ; do
|
||||
|
||||
typeset -i RUN_STARTTIME=$(date +%s)
|
||||
|
||||
actual_versions=""
|
||||
DEBUG="" # -x
|
||||
|
||||
for VERSION in $PYVERSIONS ; do
|
||||
typeset -i rc=0
|
||||
LOGFILE=/tmp/runtests-$VERSION-$$.log
|
||||
|
||||
case "$VERSION" in
|
||||
3.0.1 | 3.1.5 | 3.2.6 | 3.7.6 | 3.8.1 )
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
actual_versions="$actual_versions $VERSION"
|
||||
|
||||
if ! pyenv local $VERSION ; then
|
||||
rc=1
|
||||
else
|
||||
/bin/bash ./runtests.sh >$LOGFILE 2>&1
|
||||
STOP_ONERROR=0 /bin/bash $DEBUG ./runtests.sh >$LOGFILE 2>&1
|
||||
rc=$?
|
||||
fi
|
||||
SUBJECT_PREFIX="runtests verify for"
|
||||
if ((rc == 0)); then
|
||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION ok" ${USER}@localhost
|
||||
else
|
||||
@@ -18,3 +50,8 @@ for VERSION in 2.6.9 2.7.17 3.4.10 3.5.9 3.6.9 ; do
|
||||
tail -v $LOGFILE | mail -s "$SUBJECT_PREFIX $VERSION not ok" $EMAIL
|
||||
fi
|
||||
done
|
||||
|
||||
typeset -i RUN_ENDTIME=$(date +%s)
|
||||
(( time_diff = RUN_ENDTIME - RUN_STARTTIME))
|
||||
elapsed_time=$(displaytime $time_diff)
|
||||
echo "Run complete $elapsed_time for versions $actual_versions" | mail -s "runtests in $elapsed_time" ${EMAIL}
|
||||
|
Reference in New Issue
Block a user