-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestall.sh
More file actions
31 lines (26 loc) · 777 Bytes
/
testall.sh
File metadata and controls
31 lines (26 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Build from scratch and run unit tests from python 2.6, 2.7, 3.1
# Then run doctests to verify doc examples
# Note: requires nose installed in each python instance
error=0
rm -rf build
for ver in 2.6 2.7 3.1; do
echo "************"
echo " Python $ver"
echo "************"
echo
if which python${ver}; then
# pass in -UNDEBUG to ensure assertions are enabled in C-extensions
SETUP_PY_CFLAGS="-UNDEBUG" python${ver} setup.py build && \
python${ver} -m nose.core \
-d -w build/lib.*${ver}/ --with-coverage --cover-erase $@ || error=1
else
echo >&2 "!!! Python ${ver} not found !!!"
error=1
fi
done
echo
echo -n "Doctests... "
srcdir=`pwd`
cd build/lib.*3.?/ && python3 -m doctest ${srcdir}/doc/source/*.rst && echo "OK" || error=1
exit $error