file (GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.script)
+list (SORT scripts)
+
foreach (script ${scripts})
add_test(
NAME ${script}
--- /dev/null
+dump --verbose tri.trace
+0 glXQueryExtension(dpy = 0xfc52b0, errorb = NULL, event = NULL) = True
+1 glXChooseFBConfig(dpy = 0xfc52b0, screen = 0, attribList = {GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DOUBLEBUFFER, 1, 0}, nitems = &12) = {0xfe3620, 0xfe3710, 0xfe53e0, 0xfe54d0, 0xfe38f0, 0xfe39e0, 0xfe3e90, 0xfe56b0, 0xfe57a0, 0xfe5c50, 0xfe3f80, 0xfe5d40}
+2 glXGetVisualFromFBConfig(dpy = 0xfc52b0, config = 0xfe3620) = &{visual = 0xfd00e8, visualid = 154, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
+3 glXCreateNewContext(dpy = 0xfc52b0, config = 0xfe3620, renderType = GLX_RGBA_TYPE, shareList = NULL, direct = True) = 0xfdd650
+4 glXIsDirect(dpy = 0xfc52b0, ctx = 0xfdd650) = True
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+6 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+7 glGetString(name = GL_RENDERER) = "Mesa DRI Mobile Intel\2\556 GM45 Express Chipset "
+8 glGetString(name = GL_VERSION) = "2.1 Mesa 7.11.2"
+9 glGetString(name = GL_VENDOR) = "Tungsten Graphics, Inc"
+10 glClearColor(red = 0.3, green = 0.1, blue = 0.3, alpha = 0)
+11 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+12 glViewport(x = 0, y = 0, width = 250, height = 250)
+13 glMatrixMode(mode = GL_PROJECTION)
+14 glLoadIdentity()
+15 glOrtho(left = -1, right = 1, bottom = -1, top = 1, zNear = -0.5, zFar = 1000)
+16 glMatrixMode(mode = GL_MODELVIEW)
+17 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+18 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+19 glClear(mask = GL_COLOR_BUFFER_BIT)
+20 glBegin(mode = GL_TRIANGLES)
+21 glColor3f(red = 0.8, green = 0, blue = 0)
+22 glVertex3f(x = -0.9, y = -0.9, z = -30)
+23 glColor3f(red = 0, green = 0.9, blue = 0)
+24 glVertex3f(x = 0.9, y = -0.9, z = -30)
+25 glColor3f(red = 0, green = 0, blue = 0.7)
+26 glVertex3f(x = 0, y = 0.9, z = -30)
+27 glEnd()
+28 glFlush()
+29 glFlush()
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
+31 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+32 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
--- /dev/null
+dump --verbose --calls=draw tri.trace
+19 glClear(mask = GL_COLOR_BUFFER_BIT)
+27 glEnd()
--- /dev/null
+dump --verbose --calls=fbo tri.trace
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
--- /dev/null
+dump --verbose --calls=@callset.calls tri.trace
+1 glXChooseFBConfig(dpy = 0xfc52b0, screen = 0, attribList = {GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DOUBLEBUFFER, 1, 0}, nitems = &12) = {0xfe3620, 0xfe3710, 0xfe53e0, 0xfe54d0, 0xfe38f0, 0xfe39e0, 0xfe3e90, 0xfe56b0, 0xfe57a0, 0xfe5c50, 0xfe3f80, 0xfe5d40}
+3 glXCreateNewContext(dpy = 0xfc52b0, config = 0xfe3620, renderType = GLX_RGBA_TYPE, shareList = NULL, direct = True) = 0xfdd650
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
--- /dev/null
+dump --verbose --calls=frame tri.trace
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
--- /dev/null
+dump --verbose --calls=2-11/3 tri.trace
+2 glXGetVisualFromFBConfig(dpy = 0xfc52b0, config = 0xfe3620) = &{visual = 0xfd00e8, visualid = 154, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+8 glGetString(name = GL_VERSION) = "2.1 Mesa 7.11.2"
+11 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
--- /dev/null
+dump --verbose --calls=2-7 tri.trace
+2 glXGetVisualFromFBConfig(dpy = 0xfc52b0, config = 0xfe3620) = &{visual = 0xfd00e8, visualid = 154, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
+3 glXCreateNewContext(dpy = 0xfc52b0, config = 0xfe3620, renderType = GLX_RGBA_TYPE, shareList = NULL, direct = True) = 0xfdd650
+4 glXIsDirect(dpy = 0xfc52b0, ctx = 0xfdd650) = True
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+6 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+7 glGetString(name = GL_RENDERER) = "Mesa DRI Mobile Intel\2\556 GM45 Express Chipset "
--- /dev/null
+dump --verbose --calls=1,2,3,5,7 tri.trace
+1 glXChooseFBConfig(dpy = 0xfc52b0, screen = 0, attribList = {GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DOUBLEBUFFER, 1, 0}, nitems = &12) = {0xfe3620, 0xfe3710, 0xfe53e0, 0xfe54d0, 0xfe38f0, 0xfe39e0, 0xfe3e90, 0xfe56b0, 0xfe57a0, 0xfe5c50, 0xfe3f80, 0xfe5d40}
+2 glXGetVisualFromFBConfig(dpy = 0xfc52b0, config = 0xfe3620) = &{visual = 0xfd00e8, visualid = 154, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
+3 glXCreateNewContext(dpy = 0xfc52b0, config = 0xfe3620, renderType = GLX_RGBA_TYPE, shareList = NULL, direct = True) = 0xfdd650
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+7 glGetString(name = GL_RENDERER) = "Mesa DRI Mobile Intel\2\556 GM45 Express Chipset "
--- /dev/null
+dump --verbose --calls=10 tri.trace
+10 glClearColor(red = 0.3, green = 0.1, blue = 0.3, alpha = 0)
--- /dev/null
+dump --verbose --calls=*/draw tri.trace
+19 glClear(mask = GL_COLOR_BUFFER_BIT)
+27 glEnd()
--- /dev/null
+dump --verbose --calls=*/fbo tri.trace
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
--- /dev/null
+dump --verbose --calls=*/frame tri.trace
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
--- /dev/null
+dump --verbose --calls=*/5 tri.trace
+0 glXQueryExtension(dpy = 0xfc52b0, errorb = NULL, event = NULL) = True
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+10 glClearColor(red = 0.3, green = 0.1, blue = 0.3, alpha = 0)
+15 glOrtho(left = -1, right = 1, bottom = -1, top = 1, zNear = -0.5, zFar = 1000)
+20 glBegin(mode = GL_TRIANGLES)
+25 glColor3f(red = 0, green = 0, blue = 0.7)
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
--- /dev/null
+dump --verbose --calls=* tri.trace
+0 glXQueryExtension(dpy = 0xfc52b0, errorb = NULL, event = NULL) = True
+1 glXChooseFBConfig(dpy = 0xfc52b0, screen = 0, attribList = {GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_ALPHA_SIZE, 1, GLX_DOUBLEBUFFER, 1, 0}, nitems = &12) = {0xfe3620, 0xfe3710, 0xfe53e0, 0xfe54d0, 0xfe38f0, 0xfe39e0, 0xfe3e90, 0xfe56b0, 0xfe57a0, 0xfe5c50, 0xfe3f80, 0xfe5d40}
+2 glXGetVisualFromFBConfig(dpy = 0xfc52b0, config = 0xfe3620) = &{visual = 0xfd00e8, visualid = 154, screen = 0, depth = 24, c_class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}
+3 glXCreateNewContext(dpy = 0xfc52b0, config = 0xfe3620, renderType = GLX_RGBA_TYPE, shareList = NULL, direct = True) = 0xfdd650
+4 glXIsDirect(dpy = 0xfc52b0, ctx = 0xfdd650) = True
+5 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+6 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+7 glGetString(name = GL_RENDERER) = "Mesa DRI Mobile Intel\2\556 GM45 Express Chipset "
+8 glGetString(name = GL_VERSION) = "2.1 Mesa 7.11.2"
+9 glGetString(name = GL_VENDOR) = "Tungsten Graphics, Inc"
+10 glClearColor(red = 0.3, green = 0.1, blue = 0.3, alpha = 0)
+11 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+12 glViewport(x = 0, y = 0, width = 250, height = 250)
+13 glMatrixMode(mode = GL_PROJECTION)
+14 glLoadIdentity()
+15 glOrtho(left = -1, right = 1, bottom = -1, top = 1, zNear = -0.5, zFar = 1000)
+16 glMatrixMode(mode = GL_MODELVIEW)
+17 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+18 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+19 glClear(mask = GL_COLOR_BUFFER_BIT)
+20 glBegin(mode = GL_TRIANGLES)
+21 glColor3f(red = 0.8, green = 0, blue = 0)
+22 glVertex3f(x = -0.9, y = -0.9, z = -30)
+23 glColor3f(red = 0, green = 0.9, blue = 0)
+24 glVertex3f(x = 0.9, y = -0.9, z = -30)
+25 glColor3f(red = 0, green = 0, blue = 0.7)
+26 glVertex3f(x = 0, y = 0.9, z = -30)
+27 glEnd()
+28 glFlush()
+29 glFlush()
+30 glXSwapBuffers(dpy = 0xfc52b0, drawable = 44040194)
+
+31 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
+32 glXMakeContextCurrent(dpy = 0xfc52b0, draw = 44040194, read = 44040194, ctx = 0xfdd650) = True
--- /dev/null
+1
+3-5/2
+*/frame
--- /dev/null
+#!/usr/bin/env python
+##########################################################################
+#
+# Copyright 2012 Jose Fonseca
+# All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+##########################################################################/
+
+'''Script generator'''
+
+
+import optparse
+import subprocess
+import sys
+
+
+def main():
+
+ # Parse command line options
+ optparser = optparse.OptionParser(
+ usage='\n\t%prog [OPTIONS] -- [ARGS] ...',
+ version='%%prog')
+ optparser.add_option(
+ '--apitrace', metavar='PROGRAM',
+ type='string', dest='apitrace', default='apitrace',
+ help='path to apitrace executable')
+ (options, args) = optparser.parse_args(sys.argv[1:])
+ if not args:
+ optparser.error('an argument must be specified')
+
+ sys.stdout.write(' '.join(args) + '\n')
+ sys.stdout.flush()
+ cmd = [options.apitrace] + args
+ p = subprocess.Popen(cmd)
+ p.wait()
+ sys.exit(p.returncode)
+
+
+if __name__ == '__main__':
+ main()