Skip to content

Commit 571b5b8

Browse files
authored
Ignore tests errors when cleaning cache (#3028)
More places in tests to ignore cleanup errors on Windows. Fixes #3019.
1 parent bc6a576 commit 571b5b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/test/unit/runtime/test_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def cache_hook(*args, **kwargs):
513513
assert specialization_data is not None
514514

515515
# clear the cache
516-
shutil.rmtree(fresh_triton_cache)
516+
shutil.rmtree(fresh_triton_cache, ignore_errors=True)
517517
kernel_add.device_caches[device][0].clear()
518518

519519
# preload the kernel

python/test/unit/runtime/test_subproc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_compile_in_forked_subproc_with_forced_gc(fresh_triton_cache) -> None:
9292
compile_empty_kernel_with_gc(config)
9393

9494
# stage 2.p
95-
shutil.rmtree(fresh_triton_cache)
95+
shutil.rmtree(fresh_triton_cache, ignore_errors=True)
9696
mp_ctx = multiprocessing.get_context(start_method)
9797
proc = mp_ctx.Process(target=compile_empty_kernel_with_gc, args=(config, ))
9898

0 commit comments

Comments
 (0)