Commit 8d22bcea29cd54d9c8bbe8ea298a033a303eedeb

Patrick Steinhardt 2017-05-10T12:21:53

generate.py: generate clar cache in binary directory The source directory should usually not be touched when using out-of-tree builds. But next to the previously fixed "clar.suite" file, we are also writing the ".clarcache" into the project's source tree, breaking the builds. Fix this by also honoring the output directory for the ".clarcache" file.

diff --git a/tests/generate.py b/tests/generate.py
index b1562fa..6a6228f 100644
--- a/tests/generate.py
+++ b/tests/generate.py
@@ -158,7 +158,7 @@ class TestSuite(object):
         return modules
 
     def load_cache(self):
-        path = os.path.join(self.path, '.clarcache')
+        path = os.path.join(self.output, '.clarcache')
         cache = {}
 
         try:
@@ -171,7 +171,7 @@ class TestSuite(object):
         return cache
 
     def save_cache(self):
-        path = os.path.join(self.path, '.clarcache')
+        path = os.path.join(self.output, '.clarcache')
         with open(path, 'wb') as cache:
             pickle.dump(self.modules, cache)