Skip to content

Commit

Permalink
test runner: set exit codes on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
acdha committed Dec 11, 2012
1 parent 5626c61 commit bdc5c6a
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions 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
Expand All @@ -15,38 +17,42 @@ else
TEST_RUNNER=django-admin.py
fi

export FAIL=0

echo "** CORE **"
$TEST_RUNNER test core --settings=settings $TEST_RUNNER_ARGS
$TEST_RUNNER test core --settings=settings $TEST_RUNNER_ARGS || FAIL=1
echo ""

echo "** DISCOVERY **"
$TEST_RUNNER test discovery --settings=discovery_settings $TEST_RUNNER_ARGS
$TEST_RUNNER test discovery --settings=discovery_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""

echo "** OVERRIDES **"
$TEST_RUNNER test overrides --settings=overrides_settings $TEST_RUNNER_ARGS
$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_ARGS
$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_ARGS
$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_ARGS
$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_ARGS
$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_ARGS
$TEST_RUNNER test multipleindex --settings=multipleindex_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""

echo "** SPATIAL **"
$TEST_RUNNER test spatial --settings=spatial_settings $TEST_RUNNER_ARGS
$TEST_RUNNER test spatial --settings=spatial_settings $TEST_RUNNER_ARGS || FAIL=1
echo ""

exit $FAIL

0 comments on commit bdc5c6a

Please sign in to comment.