upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/run_gpu_tests.py
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:42:34 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:42:34 -0500
commit94d7bfddaedc055049d7a89f999bf3f89e4b6cec (patch)
treeca7f5bfb20ecb09a61f361d3b41111b069c64a62 /scripts/run_gpu_tests.py
parent7822b497f71bf347fd5267a64b54bc2496556def (diff)
parentfc52e967234fbeae47f97462667f210a7887406e (diff)
Merge pull request #2184 from AvantBras
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index 54adae976..6a2d5926c 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -1,7 +1,7 @@
1"""Assemble, translate, and run the synthetic RDNA2->SPIR-V GPU test suite on Vulkan. 1"""Assemble, translate, and run the synthetic RDNA2->SPIR-V GPU test suite on Vulkan.
2 2
3Usage: 3Usage:
4 python -I scripts/run_gpu_tests.py [--llvm-mc CMD] [--build DIR] [--work DIR] [--filter SUBSTR] 4 python -I scripts/run_gpu_tests.py [--llvm-mc CMD] [--build DIR] [--work DIR] [--filter SUBSTR] [--require-pass]
5 5
6--llvm-mc (or LLVM_MC) is a path or a whole command, e.g. "wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc". 6--llvm-mc (or LLVM_MC) is a path or a whole command, e.g. "wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc".
7""" 7"""
@@ -601,6 +601,7 @@ def main() -> int:
601 "subfolder that has the test programs is found by itself") 601 "subfolder that has the test programs is found by itself")
602 ap.add_argument("--work", default=None) 602 ap.add_argument("--work", default=None)
603 ap.add_argument("--filter", default="") 603 ap.add_argument("--filter", default="")
604 ap.add_argument("--require-pass", action="store_true", help="exit 1 if no GPU test passes")
604 a = ap.parse_args() 605 a = ap.parse_args()
605 # Some test programs run with their working directory in <work>/spirv (vk_texture_test), so a relative path 606 # Some test programs run with their working directory in <work>/spirv (vk_texture_test), so a relative path
606 # given here would point somewhere else for them. 607 # given here would point somewhere else for them.
@@ -1281,7 +1282,12 @@ def run_suite(a, work: str) -> int:
1281 skipped += ok is None 1282 skipped += ok is None
1282 print(f" {tag:4s} {name:<20s} {detail}") 1283 print(f" {tag:4s} {name:<20s} {detail}")
1283 print(f"\n{passed}/{len(results)} passed" + (f", {skipped} skipped" if skipped else "")) 1284 print(f"\n{passed}/{len(results)} passed" + (f", {skipped} skipped" if skipped else ""))
1284 return 0 if passed + skipped == len(results) else 1 1285 if passed + skipped != len(results):
1286 return 1
1287 if getattr(a, "require_pass", False) and not passed:
1288 print("error: --require-pass: no GPU tests passed", file=sys.stderr)
1289 return 1
1290 return 0
1285 1291
1286 1292
1287if __name__ == "__main__": 1293if __name__ == "__main__":