Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Minor tox.ini & test runner tidying #699

Merged
merged 4 commits into from

2 participants

@acdha
Owner
  • Tox:
    • Expanded base dependencies
    • Set TEST_RUNNER_ARGS=-v0 to reduce console noise
    • Add permutations of python 2.5, 2.6, 2.7 and django 1.3 and 1.4
    • Store downloads in tmpdir
  • test runner: set exit codes on failure
  • test runner: allow passing options to django (e.g. -v0)
acdha added some commits
@acdha acdha tox: store downloads in tmpdir b4a3176
@acdha acdha test runner: add $TEST_RUNNER_ARGS env. variable
This allows you to export TEST_RUNNER_ARGS=-v0 to affect all 9
invocations
fe84deb
@acdha acdha tox: refactor envlist to include Django versions
* Expanded base dependencies
* Set TEST_RUNNER_ARGS=-v0 to reduce console noise
* Add permutations of python 2.5, 2.6, 2.7 and django 1.3 and 1.4
5626c61
@acdha acdha test runner: set exit codes on failure bdc5c6a
@toastdriven
Owner

If it works, :shipit:

@acdha acdha merged commit b7f6782 into django-haystack:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 11, 2012
  1. @acdha

    tox: store downloads in tmpdir

    acdha authored
  2. @acdha

    test runner: add $TEST_RUNNER_ARGS env. variable

    acdha authored
    This allows you to export TEST_RUNNER_ARGS=-v0 to affect all 9
    invocations
  3. @acdha

    tox: refactor envlist to include Django versions

    acdha authored
    * Expanded base dependencies
    * Set TEST_RUNNER_ARGS=-v0 to reduce console noise
    * Add permutations of python 2.5, 2.6, 2.7 and django 1.3 and 1.4
  4. @acdha
This page is out of date. Refresh to see the latest.
Showing with 54 additions and 13 deletions.
  1. +15 −9 tests/run_all_tests.sh
  2. +39 −4 tox.ini
View
24 tests/run_all_tests.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e
+
if [ "$1" == "--help" ]; then
echo "Runs the test suite for all backends"
echo
@@ -15,38 +17,42 @@ else
TEST_RUNNER=django-admin.py
fi
+export FAIL=0
+
echo "** CORE **"
-$TEST_RUNNER test core --settings=settings
+$TEST_RUNNER test core --settings=settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** DISCOVERY **"
-$TEST_RUNNER test discovery --settings=discovery_settings
+$TEST_RUNNER test discovery --settings=discovery_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** OVERRIDES **"
-$TEST_RUNNER test overrides --settings=overrides_settings
+$TEST_RUNNER test overrides --settings=overrides_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** SIMPLE **"
-$TEST_RUNNER test simple_tests --settings=simple_settings
+$TEST_RUNNER test simple_tests --settings=simple_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** SOLR **"
-$TEST_RUNNER test solr_tests --settings=solr_settings
+$TEST_RUNNER test solr_tests --settings=solr_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** Elasticsearch **"
-$TEST_RUNNER test elasticsearch_tests --settings=elasticsearch_settings
+$TEST_RUNNER test elasticsearch_tests --settings=elasticsearch_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** WHOOSH **"
-$TEST_RUNNER test whoosh_tests --settings=whoosh_settings
+$TEST_RUNNER test whoosh_tests --settings=whoosh_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** MULTIPLE INDEX **"
-$TEST_RUNNER test multipleindex --settings=multipleindex_settings
+$TEST_RUNNER test multipleindex --settings=multipleindex_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
echo "** SPATIAL **"
-$TEST_RUNNER test spatial --settings=spatial_settings
+$TEST_RUNNER test spatial --settings=spatial_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""
+
+exit $FAIL
View
43 tox.ini
@@ -1,14 +1,49 @@
[tox]
-envlist = py25,py26,py27,docs
-downloadcache = .tox/_download/
+envlist = docs, py27-django-1.4, py27-django-1.3, py26-django-1.4, py26-django-1.3, py25-django-1.4, py25-django-1.3
+downloadcache = {envtmpdir}tox-downloadcache/
+
+[base]
+deps =
+ mock
+ pysolr
+ poster
+ whoosh
+ pyelasticsearch
+ httplib2
+ python-dateutil
+ geopy
[testenv]
setenv =
PYTHONPATH = {toxinidir}/tests
+ TEST_RUNNER_ARGS = -v0
commands =
{toxinidir}/tests/run_all_tests.sh
-deps =
- django==1.3
+deps = {[base]deps}
+
+[testenv:py27-django-1.4]
+deps = django>=1.4,<1.5
+ {[base]deps}
+
+[testenv:py27-django-1.3]
+deps = django>=1.3,<1.4
+ {[base]deps}
+
+[testenv:py26-django-1.4]
+deps = django>=1.4,<1.5
+ {[base]deps}
+
+[testenv:py26-django-1.3]
+deps = django>=1.3,<1.4
+ {[base]deps}
+
+[testenv:py25-django-1.4]
+deps = django>=1.4,<1.5
+ {[base]deps}
+
+[testenv:py25-django-1.3]
+deps = django>=1.3,<1.4
+ {[base]deps}
[testenv:docs]
changedir = docs
Something went wrong with that request. Please try again.