• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# Based on _sanity.sh from Quod Libet
3# http://www.sacredchao.net/quodlibet/
4
5set -e
6
7test -n "${srcdir}" || srcdir=.
8test -n "${PYTHON}" || PYTHON=python
9
10if test "$1" = "--help" -o "$1" = "-h"; then
11    echo "Usage: $0 --sanity | [TestName] ..."
12    exit 0
13elif [ "$1" = "--sanity" ]; then
14    echo "Running static sanity checks."
15    grep "except None:" ${srcdir}/tools/python-yasm/tests/*.py
16else
17    ${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()))"
18fi
19
20