diff options
-rw-r--r-- | gate/README (renamed from tools/hooks/README) | 0 | ||||
-rwxr-xr-x | gate/post_test_hook.sh | 21 | ||||
l---------[-rwxr-xr-x] | tools/hooks/post_test_hook.sh | 22 |
3 files changed, 22 insertions, 21 deletions
diff --git a/tools/hooks/README b/gate/README index b7df206546..b7df206546 100644 --- a/tools/hooks/README +++ b/gate/README diff --git a/gate/post_test_hook.sh b/gate/post_test_hook.sh new file mode 100755 index 0000000000..5f72eb378d --- /dev/null +++ b/gate/post_test_hook.sh @@ -0,0 +1,21 @@ +#!/bin/bash -x + +MANAGE="/usr/local/bin/nova-manage" + +function archive_deleted_rows { + # NOTE(danms): Run this a few times to make sure that we end + # up with nothing more to archive + for i in `seq 30`; do + $MANAGE db archive_deleted_rows --verbose --max_rows 1000 + RET=$? + if [[ $RET -gt 1 ]]; then + echo Archiving failed with result $RET + return $RET + elif [[ $RET -eq 0 ]]; then + echo Archiving Complete + break; + fi + done +} + +archive_deleted_rows diff --git a/tools/hooks/post_test_hook.sh b/tools/hooks/post_test_hook.sh index 5f72eb378d..c659cde494 100755..120000 --- a/tools/hooks/post_test_hook.sh +++ b/tools/hooks/post_test_hook.sh @@ -1,21 +1 @@ -#!/bin/bash -x - -MANAGE="/usr/local/bin/nova-manage" - -function archive_deleted_rows { - # NOTE(danms): Run this a few times to make sure that we end - # up with nothing more to archive - for i in `seq 30`; do - $MANAGE db archive_deleted_rows --verbose --max_rows 1000 - RET=$? - if [[ $RET -gt 1 ]]; then - echo Archiving failed with result $RET - return $RET - elif [[ $RET -eq 0 ]]; then - echo Archiving Complete - break; - fi - done -} - -archive_deleted_rows +../../gate/post_test_hook.sh
\ No newline at end of file |