aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-12-03 19:58:45 +0200
committerMatti Picus <matti.picus@gmail.com>2019-12-03 19:58:45 +0200
commite2134cc2cfd2129bbbd80e3fedad483606cadc95 (patch)
tree4e5ddc437ee358cefd8033c6838ffc01b82a5a9a
parentcentos6 has an old version of zlib (diff)
downloadpypy-e2134cc2cfd2129bbbd80e3fedad483606cadc95.tar.gz
pypy-e2134cc2cfd2129bbbd80e3fedad483606cadc95.tar.bz2
pypy-e2134cc2cfd2129bbbd80e3fedad483606cadc95.zip
clear out rpython/_cache CACHE_DIR before running tests
-rwxr-xr-xpypy/test_all.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pypy/test_all.py b/pypy/test_all.py
index 9249362d44..71c5d76de7 100755
--- a/pypy/test_all.py
+++ b/pypy/test_all.py
@@ -17,14 +17,20 @@ You need to pick a particular subdirectory and run
For more information, use test_all.py -h.
"""
import sys, os
+import shutil
if __name__ == '__main__':
if len(sys.argv) == 1 and os.path.dirname(sys.argv[0]) in '.':
print >> sys.stderr, __doc__
sys.exit(2)
- #Add toplevel repository dir to sys.path
- sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+ toplevel = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+ # Always remove the cached files
+ # Before translation this is done via "py.path.local(CACHE_DIR).remove()"
+ print 'removing %s/rpython/_cache' % toplevel
+ shutil.rmtree('%s/rpython/_cache', ignore_errors=True)
+ # Add toplevel repository dir to sys.path
+ sys.path.insert(0, toplevel)
import pytest
if sys.platform == 'win32':
#Try to avoid opening a dialog box if one of the tests causes a system error