mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 21:35:59 +00:00
test: stabilize hosted dependency and Vulkan checks
This commit is contained in:
1 parent
5d10c8e96d
commit
6affa87442
3 files changed
+10
-1
No files matched your search
@@ -22,10 +22,14 @@ class VrProducerLeaseTest(unittest.TestCase):
|
||||
subprocess.run(command + ["-o", str(executable)], check=True)
|
||||
environment = dict(os.environ)
|
||||
if gpu:
|
||||
environment["LP_NUM_THREADS"] = "2"
|
||||
manifests = sorted(Path("/usr/share/vulkan/icd.d").glob("lvp_icd*.json"))
|
||||
environment["VK_DRIVER_FILES"] = str(manifests[0])
|
||||
environment["VK_ICD_FILENAMES"] = str(manifests[0])
|
||||
result = subprocess.run([str(executable)], env=environment, capture_output=True, text=True, timeout=20)
|
||||
try:
|
||||
result = subprocess.run([str(executable)], env=environment, capture_output=True, text=True, timeout=60 if gpu else 20)
|
||||
except subprocess.TimeoutExpired as error:
|
||||
self.fail("producer test timed out: " + (error.stderr or b"").decode(errors="replace"))
|
||||
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
||||
return result.stdout
|
||||
|
||||
|
||||
Reference in new issue
Block a user