Test cleanup: remove test database if 'python manage.py test' crashes
- Legacy-Id: 205
This commit is contained in:
parent
3d84ba95d9
commit
cf4521d98d
|
@ -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
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ cd $build
|
|||
settings_local=$(py_module_file "settings_local")
|
||||
[ "$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
|
||||
|
|
|
@ -14,9 +14,9 @@ build=$PWD
|
|||
|
||||
# Database Cleanup
|
||||
# Make sure the test database has been removed
|
||||
python ietf/manage.py dbshell <<-EOT
|
||||
drop database test_ietf;
|
||||
exit;
|
||||
EOT
|
||||
if echo "show databases;" | python ietf/manage.py dbshell | grep test_ietf; then
|
||||
echo "drop database test_ietf;" | python ietf/manage.py dbshell
|
||||
echo "test database removed."
|
||||
fi
|
||||
|
||||
exit $warnings
|
||||
|
|
Loading…
Reference in a new issue