Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2011-05-14 17:22:06 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2011-05-14 17:22:06 (GMT)
commit7ed2fa4fee85007b0c6b785d5e038d95d463b0bc (patch)
treedebb600a078d92c480113d6bf80c5789a796f453
parent5c462c3b9cdba176baae6a161ff75c479ba34c12 (diff)
runalltests.py: clean entire data store, not just git
If we don't clean out the index, the second and following tests will fail because they operate on the metadata (but not data) left by the previous test(s). All we're interested in keeping across tests are the log files, so remove everything else.
-rwxr-xr-xtests/runalltests.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/runalltests.py b/tests/runalltests.py
index cbe4225..fab15ce 100755
--- a/tests/runalltests.py
+++ b/tests/runalltests.py
@@ -198,7 +198,12 @@ class TestSuiteWrapper(unittest.TestCase):
self._loop.quit()
def _clean_data_store(self):
- shutil.rmtree(os.path.expanduser('~/.gdatastore/git'))
+ data_store_dir = os.path.expanduser('~/.gdatastore')
+ for name in os.listdir(data_store_dir):
+ if name == 'logs':
+ continue
+
+ shutil.rmtree(os.path.join(data_store_dir, name))
class TimedTestResult(unittest._TextTestResult):