From ff70d109032c2f04cc3a0c12db4d6efa4311ed2a Mon Sep 17 00:00:00 2001 From: Peter Stachowski Date: Mon, 4 Apr 2016 18:09:37 +0000 Subject: [PATCH] Remove times.dbm file for each tox run If you run the py27 tox tests then attempt to run the py34 tests, the following error will occur: running testr running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ ${PYTHON:-python} -m subunit.run discover -t ./ ./ --list db type could not be determined error: testr failed (3) This happens because the apparently the times.dbm file generated by py27 is not compatible with py34. The converse is not true though - if you run py34 first, py27 will work. Both these bugs have been filed against it, but I see no resolution https://bugs.launchpad.net/testrepository/+bug/1212909 https://bugs.launchpad.net/testrepository/+bug/1229445 The work-around is to delete the file, which is what is now done before running every tox test. Once the bug has been fixed, the work-around can be removed. Change-Id: Icf5d9efc65ffda8acdcc6f43b37ef03c84b3fd43 Closes-Bug: #1565928 --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index ef0c39a6..a3de8860 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,10 @@ install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete + rm -f .testrepository/times.dbm python setup.py testr --testr-args='{posargs}' whitelist_externals = find + rm [testenv:debug] commands = oslo_debug_helper -t troveclient/tests {posargs}