Don't clobber any settings_local.py in the ietf directory while running tests -- create a temporary one in the test directory instead.
- Legacy-Id: 449
This commit is contained in:
parent
fe83e207ae
commit
8896ddb085
2
test/run
2
test/run
|
@ -13,7 +13,7 @@ test/run-pyflakes ietf
|
|||
trap 'echo "$program($LINENO): Caught Interrupt"' INT
|
||||
|
||||
# run tests with our patched django
|
||||
PYTHONPATH=test/lib python ietf/manage.py test
|
||||
PYTHONPATH=test:test/lib python ietf/manage.py test
|
||||
|
||||
# reset keyboard interrupt trap
|
||||
trap INT
|
||||
|
|
|
@ -49,7 +49,7 @@ cd $build
|
|||
settings_local=$(py_module_file "settings_local")
|
||||
[ "$settings_local" ] || die "No setting_local file available"
|
||||
|
||||
cat $settings_local test/settings_local_test.py > ietf/settings_local.py
|
||||
cat $settings_local test/settings_local_test.py > test/settings_local.py
|
||||
|
||||
# Acquire lock, to prevent running test and database update at the same time
|
||||
|
||||
|
@ -59,8 +59,8 @@ PIDFILE=$LOCKDIR/pid
|
|||
while true; do
|
||||
if mkdir $LOCKDIR; then
|
||||
echo "$$" > $PIDFILE
|
||||
chmod a+xr $LOCKDIR
|
||||
chmod a+r $PIDFILE
|
||||
chmod a+rwx $LOCKDIR
|
||||
chmod a+rw $PIDFILE
|
||||
break
|
||||
else
|
||||
pid=$(< $PIDFILE )
|
||||
|
|
|
@ -12,6 +12,11 @@ build=$PWD
|
|||
|
||||
. $progdir/shell-utils
|
||||
|
||||
# Project teardown
|
||||
# Remove the temporary settings_local.py we created for the tests
|
||||
|
||||
rm -v test/settings_local.py
|
||||
|
||||
# Database Cleanup
|
||||
# Make sure the test database has been removed
|
||||
if echo "show databases;" | python ietf/manage.py dbshell | grep test_ietf; then
|
||||
|
|
Loading…
Reference in a new issue