You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pre-kompile K definitions and specs for integration tests (#2417)
* Towards in-advance kompilation of definitions in tests
* Allow a permanent prekompiled directory
* Run less tests, for debugging purposes
* Add test_kompile_targets
* Add file lock
* De-dupe targets in a smarter way
* Don't prekompile definitions for failing tests
* Add __eq__ override to Target
* Use target name as cache key, add cache debug msgs
* Actually read cache from disk
* Revert "Run less tests, for debugging purposes"
This reverts commit 5858d0a.
* Remove debugging messages
* Correct path stuff
* Consolidate conftest.py
* Add comments
* Add pytest marker for prekompilation
* Add more comments
* Skip prekompiling in the same way as proving
* Remove Target.__eq__, improve comments
* Set Version: 1.0.546
* Skip kompilation cache test
* Skip prekompilation test if no --kompiled-targets-dir is given
* Code style
* Add smtlib markers to Word operations
* Revert "Add smtlib markers to Word operations"
This reverts commit 0ab98ac.
* Remove redundant parameter
* Revert "Remove redundant parameter"
This reverts commit 54c5c4a.
* Set Version: 1.0.548
---------
Co-authored-by: devops <[email protected]>
Populate the cache of kompiled definitions from an existing file system directory. If the cache is hot, the `kompiled_target_for` fixture will not containt a call to `kompile`, saving an expesive call to the K frontend.
145
+
"""
146
+
cache_dir=kompiled_targets_dir/'target'
147
+
cache: dict[str, Path] = {}
148
+
ifcache_dir.exists(): # cache dir exists, populate cache
149
+
forfileincache_dir.iterdir():
150
+
iffile.is_dir():
151
+
# the cache key is the name of the target, which is the filename by-construction.
Generate a function that returns a path to the kompiled defintion for a given K spec. Invoke `kompile` only if no kompiled directory is cached for the spec.
0 commit comments