X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=cli%2Fcli-trim-no-side-effects-prune-and-trim.script;fp=cli%2Fcli-trim-no-side-effects-prune-and-trim.script;h=8d84f0e1c7f51bb710f384e43b0f56e9303e1b47;hp=0000000000000000000000000000000000000000;hb=78f3329f3481c13886be0189c58b98ee29a4c484;hpb=901e36fd289e5815dcab62e7bbb54f9f05d9afdc diff --git a/cli/cli-trim-no-side-effects-prune-and-trim.script b/cli/cli-trim-no-side-effects-prune-and-trim.script new file mode 100644 index 0000000..8d84f0e --- /dev/null +++ b/cli/cli-trim-no-side-effects-prune-and-trim.script @@ -0,0 +1,39 @@ +# Verify that "trim --trim-spec=no-side-effects" can be used in +# concert with --prune. This is effectively the union of the behavior +# in the other tests: cli-trim-no-side-effects-prune and +# cli-trim-no-side-effects-trim. + +# Trim trace to frame 1. Use --trim-spec=no-side-effects to drop calls +# in frame 0 with no side effects, and use --prunt to drop calls in +# frame 1 with no side effects. + +apitrace trim --prune --deps --trim-spec=no-side-effects --frames=1 few-side-effects.trace + +# Verify that we actually trimmed what we wanted to (just calls with +# no side effects) + +apitrace diff --diff=python few-side-effects.trace few-side-effects-trim.trace +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]) + glXCreateContext(31941248, ([31985400, 34, 0, 24, 5, 16711680, 65280, 255, 256, 8]), 0, True) = 32022336 + glXMakeCurrent(31941248, 60817409, 32022336) = True +- glXQueryVersion(31941248, (1), (4)) = True + glViewport(0, 0, 64, 64) + glMatrixMode(GL_PROJECTION) + glLoadIdentity() + glOrtho(0.0, 64.0, 64.0, 0.0, 0.0, 1.0) + glMatrixMode(GL_MODELVIEW) +- glGetIntegerv(GL_LINE_WIDTH, (1)) +- glGetIntegerv(GL_LOGIC_OP_MODE, (5379)) +- glIsEnabled(GL_BLEND) = GL_FALSE + glEnable(GL_BLEND) +- glIsEnabled(GL_BLEND) = GL_TRUE + glDisable(GL_BLEND) + glXSwapBuffers(31941248, 60817409) +- glGetIntegerv(GL_LINE_WIDTH, (1)) +- glGetIntegerv(GL_LOGIC_OP_MODE, (5379)) +- glIsEnabled(GL_BLEND) = GL_FALSE + glEnable(GL_BLEND) +- glIsEnabled(GL_BLEND) = GL_TRUE + glDisable(GL_BLEND) + glXDestroyContext(31941248, 32022336) +"""