diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-07-16 23:27:15 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-07-16 23:27:15 +0900 |
commit | 7f32834df3c428fa283e966982926c94630b1b8e (patch) | |
tree | 432fb66d8dc01caeda11c1f7ad318b601b3602e9 /src/gallium/state_trackers/python/tests/base.py | |
parent | 1049e65240539228f64a91cc7b55af37bbd0417b (diff) |
python/tests: Extend the texture tests to cover cube maps.
Diffstat (limited to 'src/gallium/state_trackers/python/tests/base.py')
-rw-r--r-- | src/gallium/state_trackers/python/tests/base.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/python/tests/base.py b/src/gallium/state_trackers/python/tests/base.py index c50abf7f69..8477aa5fc9 100644 --- a/src/gallium/state_trackers/python/tests/base.py +++ b/src/gallium/state_trackers/python/tests/base.py @@ -53,7 +53,7 @@ def make_image(width, height, rgba): for y in range(0, height): for x in range(0, width): offset = (y*width + x)*4 - r, g, b, a = [int(rgba[offset + ch]*255) for ch in range(4)] + r, g, b, a = [int(min(max(rgba[offset + ch], 0.0), 1.0)*255) for ch in range(4)] outpixels[x, y] = r, g, b return outimage @@ -167,6 +167,7 @@ class TestResult: self.passed = 0 self.skipped = 0 self.failed = 0 + self.failed_descriptions = [] def test_start(self, test): self.tests += 1 @@ -180,10 +181,13 @@ class TestResult: self.skipped += 1 print "SKIP" - def test_failed(self): + def test_failed(self, test): self.failed += 1 + self.failed_descriptions.append(test.description()) print "FAIL" def summary(self): print "%u tests, %u passed, %u skipped, %u failed" % (self.tests, self.passed, self.skipped, self.failed) + for description in self.failed_descriptions: + print " %s" % description
\ No newline at end of file |