summaryrefslogtreecommitdiff
path: root/gate
diff options
context:
space:
mode:
authorSean Dague <sean@dague.net>2016-09-28 14:39:46 -0400
committerStephen Finucane <sfinucan@redhat.com>2017-01-04 11:05:16 +0000
commit95441ef896079dffd6dad115e76b68539090b356 (patch)
tree611523ebe52e9d8e14639bbefd45e65d584d7e3d /gate
parentd768bfa2c2fb774154a5268f58b28537f7b39f69 (diff)
downloadnova-95441ef896079dffd6dad115e76b68539090b356.tar.gz
move gate hooks to gate/
We prevent a lot of tests from getting run on tools/ changes given that most of that is unrelated to running any tests. By having the gate hooks in that directory it made for somewhat odd separation of what is test sensitive and what is not. This moves things to the gate/ top level directory, and puts a symlink in place to handle project-config compatibility until that can be updated. Change-Id: Iec9e89f0380256c1ae8df2d19c547d67bbdebd65
Diffstat (limited to 'gate')
-rw-r--r--gate/README4
-rwxr-xr-xgate/post_test_hook.sh21
2 files changed, 25 insertions, 0 deletions
diff --git a/gate/README b/gate/README
new file mode 100644
index 0000000000..b7df206546
--- /dev/null
+++ b/gate/README
@@ -0,0 +1,4 @@
+These are hooks to be used by the OpenStack infra test system. These scripts
+may be called by certain jobs at important times to do extra testing, setup,
+etc. They are really only relevant within the scope of the OpenStack infra
+system and are not expected to be useful to anyone else.
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