From: Zane Bitter Date: Wed, 29 May 2013 07:25:30 +0000 (+0200) Subject: Clean up DB migrations when running unit tests X-Git-Tag: 2014.1~536^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9ebf853c5db80e43d94660c37304ef626ea1c69e;p=openstack-build%2Fheat-build.git Clean up DB migrations when running unit tests When doing development work, all kinds of issue can result when moving between versions of the code that have added/removed DB migration scripts if the compiled .pyc files are left behind. To save the need to do this manually, remove all of the .pyc files when the unit tests are run. Change-Id: Ia4bc889edeeed499e5fc2172d5f7c1b4e693a27b --- diff --git a/run_tests.sh b/run_tests.sh index d6b09e1f..63b306e9 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -40,6 +40,8 @@ wrapper="" function run_tests { echo 'Running tests' + # Remove any extraneous DB migrations + find heat/db/sqlalchemy/migrate_repo/versions/ -name '*.pyc' -delete # Just run the test suites in current environment if [ -n "$args" ] ; then args="-t $args"