summaryrefslogtreecommitdiff
path: root/ci/verify-chef.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/verify-chef.sh')
-rwxr-xr-xci/verify-chef.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/ci/verify-chef.sh b/ci/verify-chef.sh
index 3db37a5cf6..a171f3428b 100755
--- a/ci/verify-chef.sh
+++ b/ci/verify-chef.sh
@@ -2,6 +2,18 @@
set -evx
+# Our tests hammer YUM pretty hard and the EL6 testers get corrupted
+# after some period of time. Rebuilding the RPM database clears
+# up the underlying corruption. We'll do this each test run just to
+# be safe.
+if [ -f /etc/redhat-release ]; then
+ major_version=`sed 's/^.\+ release \([0-9]\+\).*/\1/' /etc/redhat-release`
+ if [ "$major_version" -lt "7" ]; then
+ sudo rm -rf /var/lib/rpm/__db.00*
+ sudo rpm --rebuilddb
+ fi
+fi
+
# Set up a custom tmpdir, and clean it up before and after the tests
TMPDIR="${TMPDIR:-/tmp}/cheftest"
export TMPDIR