#!/bin/bash
# First, purge all .pyc files to clean the source tree,
# in case some modules were deleted or moved.
find . -name "*.pyc" -delete
# We look for tests by recursively searching into the tests/ dir,
# in addition to doctests within the openquake codebase.
(export DJANGO_SETTINGS_MODULE="openquake.settings";
 PYTHONPATH="$PYTHONPATH:openquake/nrml";
 nosetests --with-doctest "$@" tests openquake 2>&1 | tee last_test_run.log)
