Files
renderdoc/util/test/tests/GL/GL_Leak_Check.py
T
baldurk 12636a1607 Switch from str.format to f-strings in tests
* These were available for python 3.6 too so was never any reason not to use
  them except not being aware they existed.
2026-09-11 15:04:04 +01:00

18 lines
502 B
Python

import renderdoc as rd
import rdtest
class GL_Leak_Check(rdtest.TestCase):
demos_test_name = 'GL_Leak_Check'
demos_frame_cap = 50000
demos_frame_count = 10
demos_timeout = 120
def check_capture(self):
memory = rd.GetCurrentProcessMemoryUsage()
if memory > 500*1000*1000:
raise rdtest.TestFailureException(f"Memory usage of {memory} is too high")
rdtest.log.success(f"Capture {self.demos_frame_cap} opened with reasonable memory ({memory})")