|
1 |
| -#!/bin/sh |
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +if [ "$1" == "--help" ]; then |
| 4 | + echo "Runs the test suite for all backends" |
| 5 | + echo |
| 6 | + echo "See docs/running_tests.rst for instructions on installing test" |
| 7 | + echo "search engine instances" |
| 8 | + echo |
| 9 | + echo "Use $0 --with-coverage to execute tests using coverage.py" |
| 10 | + echo |
| 11 | + exit 0 |
| 12 | +elif [ "$1" == "--with-coverage" ]; then |
| 13 | + TEST_RUNNER="coverage run --source=$(realpath "$(dirname "$0")/../haystack") -- `which django-admin.py`" |
| 14 | +else |
| 15 | + TEST_RUNNER=django-admin.py |
| 16 | +fi |
| 17 | + |
2 | 18 | echo "** CORE **"
|
3 |
| -django-admin.py test core --settings=settings |
| 19 | +$TEST_RUNNER test core --settings=settings |
4 | 20 | echo ""
|
5 | 21 |
|
6 | 22 | echo "** DISCOVERY **"
|
7 |
| -django-admin.py test discovery --settings=discovery_settings |
| 23 | +$TEST_RUNNER test discovery --settings=discovery_settings |
8 | 24 | echo ""
|
9 | 25 |
|
10 | 26 | echo "** OVERRIDES **"
|
11 |
| -django-admin.py test overrides --settings=overrides_settings |
| 27 | +$TEST_RUNNER test overrides --settings=overrides_settings |
12 | 28 | echo ""
|
13 | 29 |
|
14 | 30 | echo "** SIMPLE **"
|
15 |
| -django-admin.py test simple_tests --settings=simple_settings |
| 31 | +$TEST_RUNNER test simple_tests --settings=simple_settings |
16 | 32 | echo ""
|
17 | 33 |
|
18 | 34 | echo "** SOLR **"
|
19 |
| -django-admin.py test solr_tests --settings=solr_settings |
| 35 | +$TEST_RUNNER test solr_tests --settings=solr_settings |
20 | 36 | echo ""
|
21 | 37 |
|
22 | 38 | echo "** Elasticsearch **"
|
23 |
| -django-admin.py test elasticsearch_tests --settings=elasticsearch_settings |
| 39 | +$TEST_RUNNER test elasticsearch_tests --settings=elasticsearch_settings |
24 | 40 | echo ""
|
25 | 41 |
|
26 | 42 | echo "** WHOOSH **"
|
27 |
| -django-admin.py test whoosh_tests --settings=whoosh_settings |
| 43 | +$TEST_RUNNER test whoosh_tests --settings=whoosh_settings |
28 | 44 | echo ""
|
29 | 45 |
|
30 | 46 | echo "** MULTIPLE INDEX **"
|
31 |
| -django-admin.py test multipleindex --settings=multipleindex_settings |
| 47 | +$TEST_RUNNER test multipleindex --settings=multipleindex_settings |
32 | 48 | echo ""
|
33 | 49 |
|
34 | 50 | echo "** SPATIAL **"
|
35 |
| -django-admin.py test spatial --settings=spatial_settings |
| 51 | +$TEST_RUNNER test spatial --settings=spatial_settings |
36 | 52 | echo ""
|
0 commit comments