Skip to content

Commit 8d22bce

Browse files
committed
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.
1 parent 9e240bd commit 8d22bce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def find_modules(self):
158158
return modules
159159

160160
def load_cache(self):
161-
path = os.path.join(self.path, '.clarcache')
161+
path = os.path.join(self.output, '.clarcache')
162162
cache = {}
163163

164164
try:
@@ -171,7 +171,7 @@ def load_cache(self):
171171
return cache
172172

173173
def save_cache(self):
174-
path = os.path.join(self.path, '.clarcache')
174+
path = os.path.join(self.output, '.clarcache')
175175
with open(path, 'wb') as cache:
176176
pickle.dump(self.modules, cache)
177177

0 commit comments

Comments
 (0)