Check tri state.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Dec 2011 12:36:06 +0000 (12:36 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Dec 2011 12:36:06 +0000 (12:36 +0000)
.gitignore
apps/gl/tri.ref.json [new file with mode: 0644]
apps/gl/tri.ref.txt
driver.py

index a90aef1090be5dad37f0be6b738b616be08600df..00e5a4e0e81f1627c23e4409d9f1513f58d1bd10 100644 (file)
@@ -5,6 +5,8 @@
 *.so
 *.diff.*
 *.thumb.*
+*.src.*
+*.diff.*
 index.html
 CMakeCache.txt
 CMakeFiles
diff --git a/apps/gl/tri.ref.json b/apps/gl/tri.ref.json
new file mode 100644 (file)
index 0000000..8a26781
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "parameters": {
+    "GL_CURRENT_COLOR": [0, 0, 0.699999988, 1],
+    "GL_VIEWPORT": [0, 0, 250, 250],
+    "GL_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.00199900055, 0, 0, 0, -0.99900049, 1],
+    "GL_SCISSOR_BOX": [0, 0, 250, 250],
+    "GL_COLOR_CLEAR_VALUE": [0.300000012, 0.100000001, 0.300000012, 1],
+    "GL_TRANSPOSE_PROJECTION_MATRIX": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.00199900055, -0.99900049, 0, 0, 0, 1]
+  }
+}
index ae43f8662acc3199b126c0474b66e77b54d262de..90dd8aa6bd96b12e95586757d4b85094b29ea513 100644 (file)
@@ -15,3 +15,4 @@ glVertex3f(x = 0, y = 0.9, z = -30)
 glEnd()
 glFlush()
 #image tri.ref.png
+#state tri.ref.json
index 0a0dc5b7bd87f8cc0b98e807a98d29a8e84f7a70..e488e13ddfaa910565a0b5572fbf2809222d7a9f 100755 (executable)
--- a/driver.py
+++ b/driver.py
@@ -140,7 +140,7 @@ class TraceChecker:
                 sys.stdout.write(line + '\n')
             mo = self.call_re.match(line)
             if mo:
-                self.call_no = int(mo.group(1))
+                self.callNo = int(mo.group(1))
                 function_name = mo.group(2)
                 if function_name.find('SwapBuffers') != -1 or \
                    line.find('kCGLPFADoubleBuffer') != -1:
@@ -310,6 +310,7 @@ class TestCase:
         if not match:
             prefix = '%s.%u' % (self.getNamePrefix(), callNo)
             srcImageFileName = prefix + '.src.png'
+            srcImage.save(srcImageFileName)
             diffImageFileName = prefix + '.diff.png'
             comparer.write_diff(diffImageFileName)
             fail('snapshot from call %u does not match %s' % (callNo, refImageFileName))