OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 # Based on _sanity.sh from Quod Libet | 2 # Based on _sanity.sh from Quod Libet |
3 # http://www.sacredchao.net/quodlibet/ | 3 # http://www.sacredchao.net/quodlibet/ |
4 # $Id: python_test.sh 1502 2006-04-17 03:53:04Z peter $ | |
5 | 4 |
6 set -e | 5 set -e |
7 | 6 |
8 test -n "${srcdir}" || srcdir=. | 7 test -n "${srcdir}" || srcdir=. |
9 test -n "${PYTHON}" || PYTHON=python | 8 test -n "${PYTHON}" || PYTHON=python |
10 | 9 |
11 if test "$1" = "--help" -o "$1" = "-h"; then | 10 if test "$1" = "--help" -o "$1" = "-h"; then |
12 echo "Usage: $0 --sanity | [TestName] ..." | 11 echo "Usage: $0 --sanity | [TestName] ..." |
13 exit 0 | 12 exit 0 |
14 elif [ "$1" = "--sanity" ]; then | 13 elif [ "$1" = "--sanity" ]; then |
15 echo "Running static sanity checks." | 14 echo "Running static sanity checks." |
16 grep "except None:" ${srcdir}/tools/python-yasm/tests/*.py | 15 grep "except None:" ${srcdir}/tools/python-yasm/tests/*.py |
17 else | 16 else |
18 ${PYTHON} -c "import sys; import glob; sys.path.insert(0, '${srcdir}/tools/p
ython-yasm'); sys.path.insert(0, glob.glob('build/lib.*')[0]); import tests; rai
se SystemExit(tests.unit('$*'.split()))" | 17 ${PYTHON} -c "import sys; import glob; sys.path.insert(0, '${srcdir}/tools/p
ython-yasm'); sys.path.insert(0, glob.glob('build/lib.*')[0]); import tests; rai
se SystemExit(tests.unit('$*'.split()))" |
19 fi | 18 fi |
20 | 19 |
OLD | NEW |