| ... |
... |
@@ -25,7 +25,7 @@ from testglobals import config, ghc_env, default_testopts, brokens, t, \ |
|
25
|
25
|
from testutil import strip_quotes, lndir, link_or_copy_file, passed, \
|
|
26
|
26
|
failBecause, testing_metrics, residency_testing_metrics, \
|
|
27
|
27
|
stable_perf_counters, \
|
|
28
|
|
- PassFail, badResult, memoize, str_removeprefix
|
|
|
28
|
+ PassFail, badResult, str_warn, str_removeprefix
|
|
29
|
29
|
from term_color import Color, colored
|
|
30
|
30
|
import testutil
|
|
31
|
31
|
from cpu_features import have_cpu_feature
|
| ... |
... |
@@ -3459,9 +3459,20 @@ if config.msys: |
|
3459
|
3459
|
exception = e
|
|
3460
|
3460
|
retries -= 1
|
|
3461
|
3461
|
|
|
|
3462
|
+ # Don't fail as framework error if cleanup fails here, just
|
|
|
3463
|
+ # print the warning and proceed. I've seen new failure mode
|
|
|
3464
|
+ # here on Windows Server 2025 and recent msys2 installation:
|
|
|
3465
|
+ # fifo.lnk is created as read-only and the on_error trick
|
|
|
3466
|
+ # above somehow doesn't work.
|
|
|
3467
|
+ #
|
|
|
3468
|
+ # For a local testsuite run, it's in %TEMP% that will be
|
|
|
3469
|
+ # periodically cleaned up anyway; for CI, there's post-job
|
|
|
3470
|
+ # cleanup and runner level cleanup. It's better to report
|
|
|
3471
|
+ # actual job pass/failure than to waste CPU cycles to spurious
|
|
|
3472
|
+ # Windows misery.
|
|
3462
|
3473
|
if retries == 0 and testdir.exists():
|
|
3463
|
|
- raise Exception("Unable to remove folder '%s': %s\nUnable to start current test."
|
|
3464
|
|
- % (testdir, exception))
|
|
|
3474
|
+ print(str_warn("Unable to remove folder '%s': %s\nUnable to start current test."
|
|
|
3475
|
+ % (testdir, exception)))
|
|
3465
|
3476
|
else:
|
|
3466
|
3477
|
def cleanup() -> None:
|
|
3467
|
3478
|
testdir = getTestOpts().testdir_raw
|