Do a trial (e)gltrace run as part of the test.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 3 Dec 2011 09:58:40 +0000 (09:58 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 3 Dec 2011 09:58:40 +0000 (09:58 +0000)
driver.py

index f909a45c65a515da0b2a15ac8fa3cc5f9a88a2f4..94641c4e23b9a974b0586951d060bb1fead5e093 100755 (executable)
--- a/driver.py
+++ b/driver.py
@@ -181,10 +181,20 @@ class TestCase:
             else:
                 self.fail('missing call %s' % ref_line)
 
+    def retrace(self):
+        retrace = self.api_map[self.api] + 'retrace'
+        args = [_get_build_path(retrace)]
+        args += [self.trace_file]
+        p = popen(args, stdout=subprocess.PIPE)
+        p.wait()
+        if p.returncode != 0:
+            self.fail('`%s` returned code %i' % (retrace, p.returncode))
+
     def run(self):
         self.standalone()
         self.trace()
         self.dump()
+        self.retrace()
 
         self.pass_()
         return
@@ -197,7 +207,9 @@ class TestCase:
         if not os.path.isfile(trace):
             sys.stdout.write('SKIP (no trace)\n')
             return
-        args = [_get_build_path('glretrace')]
+
+        retrace = self.api_map[self.api] + 'retrace'
+        args = [_get_build_path(retrace)]
         if swapbuffers:
             args += ['-db']
             frames = swapbuffers