]> git.cworth.org Git - apitrace-tests/blobdiff - trim_stress_driver.py
trim_stress: Only look at files matching [0-9]*.png when counting references
[apitrace-tests] / trim_stress_driver.py
index 0feead391d888ee2bd08dff62594f622982e8812..048062a1f9d92d48cf4f25dfeb3c6eb3ce87b4e2 100644 (file)
@@ -24,7 +24,7 @@
 
 '''Stress test driver for apitrace trim.'''
 
-import os, errno, shutil, subprocess
+import os, errno, re, shutil, subprocess
 
 from base_driver import *
 
@@ -69,6 +69,9 @@ class TrimStressDriver(Driver):
             # Don't descend into any sub-directories (not that there
             # should be any)
             del dirs[:]
+            pattern = re.compile("[0-9]*\.png")
+            def f(x): return re.match(pattern, x)
+            files = filter(f, files)
             frames = len(files)
 
         for frame in range(frames):