From f179c36aea50ab2dbb8a3d2fb43ea032e8c455e2 Mon Sep 17 00:00:00 2001
From: Pete Zaitcev <zaitcev@kotori.zaitcev.us>
Date: Wed, 2 Mar 2016 08:59:59 -0700
Subject: [PATCH] Drop *.dbm* before running tests

See change I74fb5122e80a223aaa70afaeec7a7c585aa33577 for the
previous discussion. But basically, if you run tox -e py27
then tox -e py34, the latter fails with "db type could not
be determined", because of stuck .testrepository/times.dbm.

This patch fixes it by clearing the *.dbm*. Should be safe
as long as periods aren't used commonly in stable file names.

Change-Id: I617eca308261f291c510c8cbd432779f1c00b182
---
 tox.ini | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tox.ini b/tox.ini
index cc68d315..eff0e9f9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,9 +12,9 @@ setenv =
 
 deps = -r{toxinidir}/requirements.txt
        -r{toxinidir}/test-requirements.txt
-commands = sh -c 'find . -not \( -type d -name .?\* -prune \) \
+commands = sh -c '(find . -not \( -type d -name .?\* -prune \) \
            \( -type d -name "__pycache__" -or -type f -name "*.py[co]" \) \
-           -print0 | xargs -0 rm -rf'
+           -print0; find . -name "*.dbm*" -print0) | xargs -0 rm -rf'
            python setup.py testr --testr-args="{posargs}"
 whitelist_externals = sh
 passenv = SWIFT_* *_proxy