Permalink
Browse files

Switch to django_hudson

  • Loading branch information...
1 parent d45379d commit c875b767fa71228ee48b2fd0c37723e71b0ffb6f @kmmbvnr committed Jul 3, 2010
Showing with 51 additions and 52 deletions.
  1. +2 −0 .gitignore
  2. 0 tests/__init__.py
  3. +0 −7 tests/environment.pip
  4. +31 −0 tests/manage.sh
  5. +3 −0 tests/requirements.pip
  6. +4 −0 tests/requirements_test.pip
  7. +0 −45 tests/run_tests.sh
  8. +11 −0 tests/test_runner.py
View
@@ -1,6 +1,8 @@
*.pyc
.coverage
+.cache
.ve
+reports
distribute-*.tar.gz
nosetests.xml
coverage.xml
View
No changes.
@@ -1,7 +0,0 @@
-nose
-coverage
-pylint
-http://code.djangoproject.com/svn/django/tags/releases/1.2
-git+git://github.com/cmheisel/nose-xcover.git#egg=nosexcover
-git+git://github.com/kmmbvnr/django-nose.git#egg=django-nose
-
View
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+SCRIPT_DIR=`dirname $0`
+ROOT_DIR=`cd $SCRIPT_DIR/.. && pwd`
+
+ENVSPEC=`stat -c %Y $ROOT_DIR/tests/requirements.pip`
+ENVTESTSPEC=`stat -c %Y $ROOT_DIR/tests/requirements_test.pip`
+ENVTIME=`test -r $ROOT_DIR/.ve/timestamp && stat -c %Y $ROOT_DIR/.ve/timestamp`
+set -e
+
+if [ -z "$PIP_DOWNLOAD_CACHE" ]; then
+ export PIP_DOWNLOAD_CACHE=$ROOT_DIR/.cache
+fi
+
+if [[ $ENVSPEC -gt $ENVTIME || $ENVTESTSPEC -gt $ENVTIME ]]; then
+ # Setup environment
+ rm -rf $ROOT_DIR/.ve
+ mkdir $ROOT_DIR/.ve
+ cd $ROOT_DIR/.ve
+ virtualenv --no-site-packages $ROOT_DIR/.ve
+ source $ROOT_DIR/.ve/bin/activate
+ pip install -r $ROOT_DIR/tests/requirements.pip
+ pip install -r $ROOT_DIR/tests/requirements_test.pip
+ touch $ROOT_DIR/.ve/timestamp
+else
+ source $ROOT_DIR/.ve/bin/activate
+fi
+
+cd $ROOT_DIR
+export PYTHONPATH=$ROOT_DIR
+python tests/test_runner.py $*
@@ -0,0 +1,3 @@
+django==1.2.1
+
+
@@ -0,0 +1,4 @@
+ipython
+ipdb
+git+git://github.com/kmmbvnr/django-hudson.git#egg=django-hudson
+
View
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-SCRIPT_DIR=`dirname $0`
-ROOT_DIR=`cd $SCRIPT_DIR/.. && pwd`
-
-ENVSPEC=`stat -c %Y $ROOT_DIR/tests/environment.pip`
-ENVTIME=`test -d $ROOT_DIR/.ve && stat -c %Y $ROOT_DIR/.ve`
-
-set -e
-
-cd $ROOT_DIR
-if [ $ENVSPEC -gt 0$ENVTIME ]; then
- # Setup environment
- virtualenv --no-site-packages $ROOT_DIR/.ve
- source $ROOT_DIR/.ve/bin/activate
- pip install -r $ROOT_DIR/tests/environment.pip
- touch $ROOT_DIR/.ve
-else
- source $ROOT_DIR/.ve/bin/activate
-fi
-
-# pylint
-pylint --rcfile=$ROOT_DIR/.pylintrc django_fsm > pylint.out || echo 'PyLint done'
-tail -n5 pylint.out
-
-# Run tests
-python <<EOF
-from django import conf
-from django.core import management
-
-__name__ = 'django_fsm.tests'
-class TestSettings(conf.UserSettingsHolder):
- INSTALLED_APPS=('django_fsm', 'django_nose')
- DATABASE_ENGINE='sqlite3'
- TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
- NOSE_ARGS = ['django_fsm',
- '--with-coverage',
- '--cover-package=django_fsm',
- '--with-xunit',
- '--with-xcoverage']
-
-conf.settings.configure(TestSettings(conf.global_settings))
-management.call_command('test', 'django_fsm')
-EOF
-
View
@@ -0,0 +1,11 @@
+PROJECT_APPS = ('django_fsm',)
+INSTALLED_APPS = ('django_hudson',) + PROJECT_APPS
+DATABASE_ENGINE = 'sqlite3'
+
+if __name__ == "__main__":
+ import sys, test_runner as settings
+ from django.core.management import execute_manager
+
+ if len(sys.argv) == 1:
+ sys.argv.append('test')
+ execute_manager(settings)

0 comments on commit c875b76

Please sign in to comment.