File: python_test.sh

package info (click to toggle)
yasm 1.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,880 kB
  • sloc: asm: 74,423; ansic: 53,055; python: 9,927; sh: 5,276; xml: 1,617; makefile: 214; pascal: 95; sed: 16
file content (19 lines) | stat: -rwxr-xr-x 616 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# Based on _sanity.sh from Quod Libet
# http://www.sacredchao.net/quodlibet/

set -e

test -n "${srcdir}" || srcdir=.
test -n "${PYTHON}" || PYTHON=python

if test "$1" = "--help" -o "$1" = "-h"; then
    echo "Usage: $0 --sanity | [TestName] ..."
    exit 0
elif [ "$1" = "--sanity" ]; then
    echo "Running static sanity checks."
    grep "except None:" ${srcdir}/tools/python-yasm/tests/*.py
else
    ${PYTHON} -c "import sys; import glob; sys.path.insert(0, '${srcdir}/tools/python-yasm'); sys.path.insert(0, glob.glob('build/lib.*')[0]); import tests; raise SystemExit(tests.unit('$*'.split()))"
fi