Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Testing shell script added for testing of python src (django mostly).
  • Loading branch information
clemesha-ooi committed Feb 9, 2010
1 parent 38114d1 commit 7f23d0d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
8 changes: 0 additions & 8 deletions web/src/python/README

This file was deleted.

2 changes: 1 addition & 1 deletion web/src/python/nimbusweb/portal/settings.py
Expand Up @@ -63,7 +63,7 @@
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.sites', 'django.contrib.sites',
#'cpserver', 'cpserver',
'nimbusweb.portal.nimbus', 'nimbusweb.portal.nimbus',
'nimbusweb.portal.usercreate', 'nimbusweb.portal.usercreate',
) )
Expand Down
26 changes: 26 additions & 0 deletions web/src/python/run-tests.sh
@@ -0,0 +1,26 @@
# Usage:
#
# $ ./run-tests.sh django-app-name-to-test
#
# If you do not specify an app name, all test will run.
# TODO: let '--verbosity' be passed in as an argument.
#
PYTHON_EXE="/usr/bin/env python"

NIMBUS_WEBDIR_REL="`dirname $0`/../.."
NIMBUS_WEBDIR=`cd $NIMBUS_WEBDIR_REL; pwd`

NIMBUS_WEBCONF="$NIMBUS_WEBDIR/nimbusweb.conf"
if [ ! -f "$NIMBUS_WEBCONF" ]; then
echo ""
echo "Cannot find conf file, exiting. (expected at '$NIMBUS_WEBCONF')"
exit 1
fi

NIMBUS_PYLIB="$NIMBUS_WEBDIR/lib/python"
NIMBUS_PYSRC="$NIMBUS_WEBDIR/src/python"

PYTHONPATH="$NIMBUS_PYSRC:$NIMBUS_PYLIB:$PYTHONPATH"
export PYTHONPATH

$PYTHON_EXE $NIMBUS_PYSRC/nimbusweb/portal/manage.py test --verbosity=2 $1

0 comments on commit 7f23d0d

Please sign in to comment.