diff options
| author | Aslan2142 <jan.trencansky@protonmail.com> | 2026-12-01 16:14:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-12-01 16:14:58 +0100 |
| commit | cc846ba5ca2933871aa815d9148144a9a8a0954f (patch) | |
| tree | edb5a6922ebca715a5e5c8194a83f63c7066ea58 /scripts | |
| parent | f0c4fe0b43528b8d1b14a73645585ec8deb38f86 (diff) | |
| parent | e8960d3c58f0f998a19b0c9983110750ce5bebc6 (diff) | |
Merge pull request #1302 from delysidemanYT1/gpu-runner-temp-error
GPU-RUNNER-TEMP-ERROR: report temporary directory creation failures
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/run_gpu_tests.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index c9f8bfd65..2abc1c0aa 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -1043,13 +1043,21 @@ def main() -> int: | |||
| 1043 | "Vulkan headers (vulkan-headers on Arch) and configure again.") | 1043 | "Vulkan headers (vulkan-headers on Arch) and configure again.") |
| 1044 | a.build = resolved_build | 1044 | a.build = resolved_build |
| 1045 | 1045 | ||
| 1046 | work = a.work or tempfile.mkdtemp(prefix="leonida_gpu_tests_") | 1046 | work = a.work |
| 1047 | try: | 1047 | try: |
| 1048 | try: | 1048 | if work is None: |
| 1049 | work = tempfile.mkdtemp(prefix="leonida_gpu_tests_") | ||
| 1050 | else: | ||
| 1049 | os.makedirs(work, exist_ok=True) | 1051 | os.makedirs(work, exist_ok=True) |
| 1050 | except OSError as exc: # the same report run_suite gives for its own folders (#4544) | 1052 | except OSError as exc: |
| 1053 | if work is None: | ||
| 1054 | print(f"error: cannot create a temporary GPU test directory: {exc}. " | ||
| 1055 | "Pass --work with a writable directory.", file=sys.stderr) | ||
| 1056 | else: | ||
| 1051 | print(f"error: cannot prepare GPU test directory {work}: {exc.strerror or exc}", file=sys.stderr) | 1057 | print(f"error: cannot prepare GPU test directory {work}: {exc.strerror or exc}", file=sys.stderr) |
| 1052 | return 2 | 1058 | return 2 |
| 1059 | |||
| 1060 | try: | ||
| 1053 | native = native_folder(work) | 1061 | native = native_folder(work) |
| 1054 | if native is None: | 1062 | if native is None: |
| 1055 | print(f"error: the work folder {ascii(work)} has characters outside this PC's ANSI code page and no 8.3 " | 1063 | print(f"error: the work folder {ascii(work)} has characters outside this PC's ANSI code page and no 8.3 " |