Commit c9cfb851 authored by Dylan Baker's avatar Dylan Baker

tests/quick_shader.py: Fix test count of quick_shader

This filter hasn't worked quite right since the XML profile conversion,
the reason is that the assumption all filters had before the conversion
was that they would be used once, which is no longer true. They'll be
run at least twice now, once to get the count of tests, and once to
run the tests.

With the addition of the reset() method to the filter protocol, and the
Filter class that calls it, we can set the seed in the random generator
back to 42 (an arbitrary starting value), before it's run. This ensures
that the generation of the count and running of the actual tests match.
Tested-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent dddfbdfe
......@@ -46,6 +46,9 @@ class FilterVsIn(object):
return self.random.random() <= .2
return True
def reset(self):
self.random.seed(42)
profile.filters.append(FilterVsIn())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment