Test cleanup: remove test database if 'python manage.py test' crashes

- Legacy-Id: 205
This commit is contained in:
Henrik Levkowetz 2007-06-01 17:01:32 +00:00
parent 3d84ba95d9
commit cf4521d98d
3 changed files with 6 additions and 6 deletions

View file

@ -43,5 +43,5 @@ function py_module_file() {
} }
trap 'echo "$program($LINENO): Command failed with error code $? ($0 $*)"; exit 1' ERR #trap 'echo "$program($LINENO): Command failed with error code $? ($0 $*)"; exit 1' ERR

View file

@ -49,7 +49,7 @@ cd $build
settings_local=$(py_module_file "settings_local") settings_local=$(py_module_file "settings_local")
[ "$settings_local" ] || err [ "$settings_local" ] || err
cat $settings_local test/settings_local_test.py - > ietf/settings_local.py cat $settings_local test/settings_local_test.py > ietf/settings_local.py
exit $warnings exit $warnings

View file

@ -14,9 +14,9 @@ build=$PWD
# Database Cleanup # Database Cleanup
# Make sure the test database has been removed # Make sure the test database has been removed
python ietf/manage.py dbshell <<-EOT if echo "show databases;" | python ietf/manage.py dbshell | grep test_ietf; then
drop database test_ietf; echo "drop database test_ietf;" | python ietf/manage.py dbshell
exit; echo "test database removed."
EOT fi
exit $warnings exit $warnings