Staging
v0.8.1
v0.8.1
https://github.com/python/cpython
Revision ad3d5c2235743f23db54fb5ef2c337a0e21c9548 authored by Benjamin Peterson on 26 February 2009, 03:38:59 UTC, committed by Benjamin Peterson on 26 February 2009, 03:38:59 UTC
svn+ssh://pythondev@svn.python.org/python/trunk ........ r69803 | georg.brandl | 2009-02-20 01:48:21 -0600 (Fri, 20 Feb 2009) | 1 line #5327: fix a broken link by joining it. ........ r69804 | georg.brandl | 2009-02-20 02:22:21 -0600 (Fri, 20 Feb 2009) | 1 line At least separate imports from other statements. ........ r69805 | georg.brandl | 2009-02-20 02:45:47 -0600 (Fri, 20 Feb 2009) | 2 lines Fix punctuation. ........ r69840 | georg.brandl | 2009-02-21 13:09:40 -0600 (Sat, 21 Feb 2009) | 1 line #5338, #5339: two types in the API manual. ........ r69901 | georg.brandl | 2009-02-23 05:24:46 -0600 (Mon, 23 Feb 2009) | 2 lines #5349: C++ pure virtuals can also have an implementation. ........ r69905 | georg.brandl | 2009-02-23 09:51:27 -0600 (Mon, 23 Feb 2009) | 2 lines #5352: str.count() counts non-overlapping instances. ........ r69907 | georg.brandl | 2009-02-23 12:33:48 -0600 (Mon, 23 Feb 2009) | 1 line Fix grammar. ........ r69924 | benjamin.peterson | 2009-02-23 20:45:35 -0600 (Mon, 23 Feb 2009) | 1 line update README on running tests ........ r69927 | neil.schemenauer | 2009-02-23 22:23:25 -0600 (Mon, 23 Feb 2009) | 1 line Fix call to os.waitpid, it does not take keyword args. ........ r69987 | benjamin.peterson | 2009-02-25 18:30:11 -0600 (Wed, 25 Feb 2009) | 1 line fix str.format()'s first arg #5371 ........
1 parent 40ce6cc
Tip revision: ad3d5c2235743f23db54fb5ef2c337a0e21c9548 authored by Benjamin Peterson on 26 February 2009, 03:38:59 UTC
Merged revisions 69803-69805,69840,69901,69905,69907,69924,69927,69987 via svnmerge from
Merged revisions 69803-69805,69840,69901,69905,69907,69924,69927,69987 via svnmerge from
Tip revision: ad3d5c2
runtests.sh
#!/bin/bash
HELP="Usage: ./runtests.py [-h] [-x] [flags] [tests]
Runs each unit test independently, with output directed to a file in
OUT/<test>.out. If no tests are given, all tests are run; otherwise,
only the specified tests are run, unless -x is also given, in which
case all tests *except* those given are run.
Standard output shows the name of the tests run, with 'BAD' or
'SKIPPED' added if the test didn't produce a positive result. Also,
three files are created, named 'BAD', 'GOOD' and 'SKIPPED', to which
are written the names of the tests categorized by result.
Flags (arguments starting with '-') are passed transparently to
regrtest.py, except for -x, which is processed here."
# Choose the Python binary.
case `uname` in
Darwin) PYTHON=./python.exe;;
CYGWIN*) PYTHON=./python.exe;;
*) PYTHON=./python;;
esac
PYTHON="$PYTHON -bb"
# Unset PYTHONPATH, just to be sure.
unset PYTHONPATH
# Create the output directory if necessary.
mkdir -p OUT
# Empty the summary files.
>GOOD
>BAD
>SKIPPED
# Process flags (transparently pass these on to regrtest.py)
FLAGS=""
EXCEPT=""
while :
do
case $1 in
-h|--h|-help|--help) echo "$HELP"; exit;;
--) FLAGS="$FLAGS $1"; shift; break;;
-x) EXCEPT="$1"; shift;;
-*) FLAGS="$FLAGS $1"; shift;;
*) break;;
esac
done
# Compute the list of tests to run.
case "$#$EXCEPT" in
0)
TESTS=`(cd Lib/test; ls test_*.py | sed 's/\.py//')`
;;
*-x)
PAT="^(`echo $@ | sed 's/\.py//' | sed 's/ /|/'`)$"
TESTS=`(cd Lib/test; ls test_*.py | sed 's/\.py//' | egrep -v "$PAT")`
;;
*)
TESTS="$@"
;;
esac
# Run the tests.
for T in $TESTS
do
echo -n $T
if case $T in
*curses*)
echo
$PYTHON -E Lib/test/regrtest.py $FLAGS $T 2>OUT/$T.out
;;
*) $PYTHON -E Lib/test/regrtest.py $FLAGS $T >OUT/$T.out 2>&1;;
esac
then
if grep -q "1 test skipped:" OUT/$T.out
then
echo " SKIPPED"
echo $T >>SKIPPED
else
echo
echo $T >>GOOD
fi
else
echo " BAD"
echo $T >>BAD
fi
done
# Summarize results
wc -l BAD GOOD SKIPPED
Computing file changes ...