diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-14 21:41:41 +0200 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-14 21:41:41 +0200 |
commit | 56d44c80761fab918ef95598431091b878adfa6f (patch) | |
tree | 8b9a12e3a35a75b8ff6b1d4d5d727ef18c3afe64 | |
parent | e8cd19c180cf4ede216600a1584eee2dc20e0b07 (diff) |
Workaround window manager disrupting test in some cases
-rw-r--r-- | framework/core.py | 7 | ||||
-rw-r--r-- | tests/r300.tests | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/framework/core.py b/framework/core.py index 2e526a176..760ec1a40 100644 --- a/framework/core.py +++ b/framework/core.py @@ -29,6 +29,7 @@ import re import stat import subprocess import sys +import time import traceback __all__ = [ @@ -275,6 +276,7 @@ class Environment: class Test: ignoreErrors = [] + sleep = 0 def __init__(self): pass @@ -305,6 +307,8 @@ class Test: print " result: %(result)s" % { 'result': result['result'] } result.write(env.file,path) + if Test.sleep: + time.sleep(Test.sleep) else: print "Dry-run: %(path)s" % locals() @@ -345,6 +349,7 @@ class Group(dict): class TestProfile: def __init__(self): self.tests = Group() + self.sleep = 0 def run(self, env): self.tests.doRun(env, '') @@ -356,7 +361,7 @@ class TestProfile: def loadTestProfile(filename): try: ns = { - '__file__': filename, + '__file__': filename } execfile(filename, ns) return ns['profile'] diff --git a/tests/r300.tests b/tests/r300.tests index 646a828b8..6c12656c8 100644 --- a/tests/r300.tests +++ b/tests/r300.tests @@ -20,6 +20,12 @@ Test.ignoreErrors.append(re.compile('3D driver claims to not support')) # Debug info Test.ignoreErrors.append(re.compile('Try R300_SPAN_DISABLE_LOCKING env var if this hangs.')) +# Some window managers can be confusing for some of the tests because they +# send resize / move events that invalidate frame buffer contents. +# It would be nice to fix these things in a reliable way, but for now +# this workaround of waiting between tests helps... +Test.sleep = 0.2 + # glean/blendFunc # R300 blending hardware appears to be bad @@ -32,7 +38,6 @@ env['GLEAN_BLEND_ALPHA_TOLERANCE'] = 2.0 env = profile.tests['glean']['exactRGBA'].env env['GLEAN_EXACTRGBA_ROUNDING'] = 1 - # Tests specific to r300 r300 = Group() # Apparently, LOD calculations are off a little for small MIP levels. |