Don't do cache stuff if cache not provided
This commit is contained in:
parent
1994cecde8
commit
f3f4f7157f
1 changed files with 5 additions and 3 deletions
|
@ -130,8 +130,9 @@ class SmoketestRun:
|
|||
return
|
||||
|
||||
cache_simfile: Optional[Simfile] = None
|
||||
with context.perform("cache.open", path=simfile_path) as context:
|
||||
cache_simfile = self._open_cached_simfile(context, simfile_path=simfile_path)
|
||||
if self.args.cache_dir:
|
||||
with context.perform("cache.open", path=simfile_path) as context:
|
||||
cache_simfile = self._open_cached_simfile(context, simfile_path=simfile_path)
|
||||
|
||||
with context.perform("simfile.open", path=simfile_path) as context:
|
||||
sim = simfile.open(simfile_path)
|
||||
|
@ -142,7 +143,8 @@ class SmoketestRun:
|
|||
) as context:
|
||||
self._test_simfile(context, sim)
|
||||
|
||||
self._compare_to_cache(context, sim=sim, cache=cache_simfile)
|
||||
if self.args.cache_dir:
|
||||
self._compare_to_cache(context, sim=sim, cache=cache_simfile)
|
||||
|
||||
def _test_simfile(self, context: SimfileContext, sim: Simfile):
|
||||
with context.perform("TimingData") as context:
|
||||
|
|
Loading…
Reference in a new issue