From 2c00a00c867378bdc047f5951edbbe1be61d2295 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 28 Jan 2013 23:05:26 +1100 Subject: [PATCH] trim_stress: Only look at files matching [0-9]*.png when counting references If there are any differences from a previous run, there will be several additional image files left around, (.thumb.png, etc.). And we don't want to count those. --- trim_stress_driver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trim_stress_driver.py b/trim_stress_driver.py index 0feead3..048062a 100644 --- a/trim_stress_driver.py +++ b/trim_stress_driver.py @@ -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): -- 2.43.0