Force ASV to clear the cache according to specified commit hashes.
(bench_path, h_commits, env_dir="env")
| 585 | return nconf_path |
| 586 | |
| 587 | def asv_clear_cache(bench_path, h_commits, env_dir="env"): |
| 588 | """ |
| 589 | Force ASV to clear the cache according to specified commit hashes. |
| 590 | """ |
| 591 | # FIXME: only clear the cache from the current environment dir |
| 592 | asv_build_pattern = os.path.join(bench_path, env_dir, "*", "asv-build-cache") |
| 593 | for asv_build_cache in glob.glob(asv_build_pattern, recursive=True): |
| 594 | for c in h_commits: |
| 595 | try: shutil.rmtree(os.path.join(asv_build_cache, c)) |
| 596 | except OSError: pass |
| 597 | |
| 598 | def asv_substitute_config(in_config, out_config, **custom_vars): |
| 599 | """ |
no test coverage detected