diff options
| author | MoonEyes <ducoinbenjamin@yahoo.fr> | 2026-11-29 02:32:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-29 02:32:13 +0100 |
| commit | 35159222a46c03dfd8965ddaec8d83d3fcd19376 (patch) | |
| tree | 84718d39a5405672578c06fa730df4ae72ff3e73 /scripts | |
| parent | 583882ea2fc92bedb28d87c7280fb64ebf981b68 (diff) | |
| parent | 3de809cf6db9507ca679c5f2ca0919abe98b75b6 (diff) | |
Merge pull request #919 from TuroYT/fix/wine-drive-map-oserror
run_wine_tests: keep going when the drive cannot be mapped (WINE-DRIVE-MAP-OSERROR)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/run_wine_tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py index e43f62016..fa98fad31 100644 --- a/scripts/run_wine_tests.py +++ b/scripts/run_wine_tests.py | |||
| @@ -104,7 +104,8 @@ class DriveMap: | |||
| 104 | <root>/runtime/build/generated/x.spv. The drive is a dosdevices link to a scratch folder holding a/Leonida/Leonida | 104 | <root>/runtime/build/generated/x.spv. The drive is a dosdevices link to a scratch folder holding a/Leonida/Leonida |
| 105 | as a link to the root. If the Windows checkout is the drive root itself, the drive links directly to the | 105 | as a link to the root. If the Windows checkout is the drive root itself, the drive links directly to the |
| 106 | Linux checkout. Temporary links and scratch folders are removed afterwards. A drive the prefix already has | 106 | Linux checkout. Temporary links and scratch folders are removed afterwards. A drive the prefix already has |
| 107 | (c:, z:, or one set up by hand) is left alone, and so is a root without an absolute drive path. | 107 | (c:, z:, or one set up by hand) is left alone, and so is a root without an absolute drive path. A prefix that |
| 108 | cannot take the link (read-only, permission denied) also leaves the drive unmapped; the note says why. | ||
| 108 | """ | 109 | """ |
| 109 | 110 | ||
| 110 | def __init__(self, windows_root: str, root: str, prefix: str): | 111 | def __init__(self, windows_root: str, root: str, prefix: str): |
| @@ -141,6 +142,10 @@ class DriveMap: | |||
| 141 | self.note = already_set | 142 | self.note = already_set |
| 142 | return self | 143 | return self |
| 143 | self.link = link | 144 | self.link = link |
| 145 | except OSError as e: | ||
| 146 | # A read-only or otherwise unwritable prefix: run the tests without the drive, and say so. | ||
| 147 | self.note = f"cannot map drive {drive}: {e.strerror or e}: the run goes on without it" | ||
| 148 | return self | ||
| 144 | finally: | 149 | finally: |
| 145 | # __exit__ only runs after a successful __enter__. | 150 | # __exit__ only runs after a successful __enter__. |
| 146 | if self.link is None and self.scratch is not None: | 151 | if self.link is None and self.scratch is not None: |