1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

test: remove package_check lock on abort

This commit is contained in:
Pierre de La Morinerie 2017-10-24 16:58:39 +05:30
parent 45e0de61ae
commit 080364503b

11
test.sh
View file

@ -56,6 +56,17 @@ function test_package_check() {
_vagrant_ssh "package_check/package_check.sh --bash-mode '$APP_DIR'" _vagrant_ssh "package_check/package_check.sh --bash-mode '$APP_DIR'"
} }
function abort() {
trap - SIGINT SIGTERM
echo "--- Aborting ---"
if (vagrant status | grep -q "running"); then
echo "Removing package_check lock…"
_vagrant_ssh "rm -f package_check/pcheck.lock"
fi
teardown
}
trap abort SIGINT SIGTERM
function teardown() { function teardown() {
echo "--- Cleaning up ---" echo "--- Cleaning up ---"
} }