Trapping keyboard interrupt to make sure the test teardown gets run after the test suite
- Legacy-Id: 431
This commit is contained in:
parent
6afd4b826f
commit
6ecfbde53f
9
test/run
9
test/run
|
@ -9,7 +9,14 @@ test/test-setup # create a patched django for test purposes, and more
|
||||||
|
|
||||||
test/run-pyflakes ietf
|
test/run-pyflakes ietf
|
||||||
|
|
||||||
PYTHONPATH=test/lib python ietf/manage.py test # run tests with our patched django
|
# Trap keyboard interrupt to ensure the test/teardown is run if we interrupt the tests
|
||||||
|
trap 'echo "$program($LINENO): Caught Interrupt"' INT
|
||||||
|
|
||||||
|
# run tests with our patched django
|
||||||
|
PYTHONPATH=test/lib python ietf/manage.py test
|
||||||
|
|
||||||
|
# reset keyboard interrupt trap
|
||||||
|
trap INT
|
||||||
|
|
||||||
test/test-teardown
|
test/test-teardown
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue