From: José Fonseca Date: Tue, 4 Dec 2012 03:17:55 +0000 (+0000) Subject: trim: Update for --exact -> --auto X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=commitdiff_plain;h=8956eb531059e5f3012db55bede18b44638fa23a;hp=8d0a37a705d6b242672da7527d0f83397d162ac8 trim: Update for --exact -> --auto --- diff --git a/cli/cli-trim-single-swapbuffers.script b/cli/cli-trim-single-swapbuffers.script index a04ad0e..e653d49 100644 --- a/cli/cli-trim-single-swapbuffers.script +++ b/cli/cli-trim-single-swapbuffers.script @@ -1,6 +1,6 @@ # First, trim the trace to the final glxSwapBuffers call -apitrace trim --calls=27 tri.trace +apitrace trim --auto --calls=27 tri.trace # Then dump the image and compare to our reference diff --git a/cli/cli-trim-unused-shaders.script b/cli/cli-trim-unused-shaders.script index c126ac0..2fb53df 100644 --- a/cli/cli-trim-unused-shaders.script +++ b/cli/cli-trim-unused-shaders.script @@ -8,7 +8,7 @@ apitrace dump-images --calls=10,47,50,71,87,88 --call-nos=no -o ./glxsimple-ref/ # Trim to the same callset used to generate reference images -apitrace trim --calls=10,47,50,71,87,88 glxsimple.trace +apitrace trim --auto --calls=10,47,50,71,87,88 glxsimple.trace # Verify that we actually trimmed what we wanted to diff --git a/cli/cli-trim-unused-textures.script b/cli/cli-trim-unused-textures.script index a82555e..e902042 100644 --- a/cli/cli-trim-unused-textures.script +++ b/cli/cli-trim-unused-textures.script @@ -8,7 +8,7 @@ apitrace dump-images --calls=10,31,50,71,87,88 --call-nos=no -o ./glxsimple-ref/ # Trim to the same callset used to generate reference images -apitrace trim --calls=10,31,50,71,87,88 glxsimple.trace +apitrace trim --auto --calls=10,31,50,71,87,88 glxsimple.trace # Verify that we actually trimmed what we wanted to diff --git a/traces/trim-frame-set.script b/traces/trim-frame-set.script index a6175be..33293c3 100644 --- a/traces/trim-frame-set.script +++ b/traces/trim-frame-set.script @@ -1,4 +1,4 @@ -trim --frames=0-5/draw,0-5/frame --exact glxsimple.trace +trim --frames=0-5/draw,0-5/frame glxsimple.trace dump --verbose glxsimple-trim.trace 0 glClear(mask = GL_COLOR_BUFFER_BIT) 1 glXSwapBuffers(dpy = 0x236a280, drawable = 41943041) diff --git a/traces/trim-head-by-frame.script b/traces/trim-head-by-frame.script index ee5ddb4..64b7eb3 100644 --- a/traces/trim-head-by-frame.script +++ b/traces/trim-head-by-frame.script @@ -1,5 +1,5 @@ -trim --frames=0 glxsimple.trace -dump --verbose glxsimple-trim.trace +trim -o trim-head-by-frame.src.trace --auto --frames=0 glxsimple.trace +dump --verbose trim-head-by-frame.src.trace 0 glXChooseVisual(dpy = 0x236a280, screen = 0, attribList = {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}) = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8} 1 glXCreateContext(dpy = 0x236a280, vis = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}, shareList = NULL, direct = True) = 0x2384330 2 glXMakeCurrent(dpy = 0x236a280, drawable = 41943041, ctx = 0x2384330) = True diff --git a/traces/trim-head.script b/traces/trim-head.script index 70e8ef5..897e4e9 100644 --- a/traces/trim-head.script +++ b/traces/trim-head.script @@ -1,5 +1,5 @@ -trim --calls=0-843 glxsimple.trace -dump --verbose glxsimple-trim.trace +trim -o trim-head.src.trace --auto --calls=0-843 glxsimple.trace +dump --verbose trim-head.src.trace 0 glXChooseVisual(dpy = 0x236a280, screen = 0, attribList = {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}) = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8} 1 glXCreateContext(dpy = 0x236a280, vis = &{visual = 0x2374ef8, visualid = 34, screen = 0, depth = 24, c_class = 5, red_mask = 16711680, green_mask = 65280, blue_mask = 255, colormap_size = 256, bits_per_rgb = 8}, shareList = NULL, direct = True) = 0x2384330 2 glXMakeCurrent(dpy = 0x236a280, drawable = 41943041, ctx = 0x2384330) = True diff --git a/trim_stress_driver.py b/trim_stress_driver.py index 5b10f14..64863f8 100644 --- a/trim_stress_driver.py +++ b/trim_stress_driver.py @@ -22,7 +22,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -'''Stress test driver for apitrace trimp.''' +'''Stress test driver for apitrace trim.''' import os, errno, shutil, subprocess @@ -68,7 +68,7 @@ class TrimStressDriver(Driver): for frame in range(frames): try: - subprocess.check_call([self.options.apitrace, "trim", "--frame=%d" % (frame), "--output=" + trim_file, trace_file]) + subprocess.check_call([self.options.apitrace, "trim", "--auto", "--frame=%d" % (frame), "--output=" + trim_file, trace_file]) except: print "An error occurred while trimming frame %d from %s" % (frame, trace_file) fail()