]> git.cworth.org Git - apitrace-tests/blob - cli/cli-trim-no-side-effects-trim.script
Rework testing of trimming of operations with no side effects
[apitrace-tests] / cli / cli-trim-no-side-effects-trim.script
1 # Verify that trim can be used to drop calls outside the specified range
2 # that have no side effects.
3
4 # Trim trace to frame 1, but dropping calls from first frame 0 with no
5 # side effects.
6
7 apitrace trim --deps --trim-spec=no-side-effects --frames=1 few-side-effects.trace
8
9 # Verify that we actually trimmed what we wanted to (just calls with
10 # no side effects)
11
12 apitrace diff --diff=python few-side-effects.trace few-side-effects-trim.trace
13 expect r"""  glXChooseVisual(31941248, 0, (GLX_RGBA, GLX_RED_SIZE, GLX_RED_SIZE, GLX_GREEN_SIZE, GLX_RED_SIZE, GLX_BLUE_SIZE, GLX_RED_SIZE, GLX_ALPHA_SIZE, GLX_RED_SIZE, GLX_DOUBLEBUFFER, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, GLX_RED_SIZE, GLX_X_VISUAL_TYPE, GLX_DIRECT_COLOR, 0)) = ([31985400, 34, 0, 24, 5, 16711680, 65280, 255, 256, 8])
14   glXCreateContext(31941248, ([31985400, 34, 0, 24, 5, 16711680, 65280, 255, 256, 8]), 0, True) = 32022336
15   glXMakeCurrent(31941248, 60817409, 32022336) = True
16 - glXQueryVersion(31941248, (1), (4)) = True
17   glViewport(0, 0, 64, 64)
18   glMatrixMode(GL_PROJECTION)
19   glLoadIdentity()
20   glOrtho(0.0, 64.0, 64.0, 0.0, 0.0, 1.0)
21   glMatrixMode(GL_MODELVIEW)
22 - glGetIntegerv(GL_LINE_WIDTH, (1))
23 - glGetIntegerv(GL_LOGIC_OP_MODE, (5379))
24 - glIsEnabled(GL_BLEND) = GL_FALSE
25   glEnable(GL_BLEND)
26 - glIsEnabled(GL_BLEND) = GL_TRUE
27   glDisable(GL_BLEND)
28   glXSwapBuffers(31941248, 60817409)
29   glGetIntegerv(GL_LINE_WIDTH, (1))
30   glGetIntegerv(GL_LOGIC_OP_MODE, (5379))
31   glIsEnabled(GL_BLEND) = GL_FALSE
32   glEnable(GL_BLEND)
33   glIsEnabled(GL_BLEND) = GL_TRUE
34   glDisable(GL_BLEND)
35   glXDestroyContext(31941248, 32022336)
36 """