[Piglit] [PATCH 2/2] fbo-blit-stretch: add ability to choose a subtest

Brian Paul brianp at vmware.com
Wed Sep 12 08:14:47 PDT 2012


On 09/12/2012 08:29 AM, Marek Olšák wrote:
> ---
>   tests/fbo/fbo-blit-stretch.cpp |    9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/tests/fbo/fbo-blit-stretch.cpp b/tests/fbo/fbo-blit-stretch.cpp
> index f990954..4c4b528 100644
> --- a/tests/fbo/fbo-blit-stretch.cpp
> +++ b/tests/fbo/fbo-blit-stretch.cpp
> @@ -530,11 +530,17 @@ tests[] = {
>   	},
>   };
>
> +static int test_index = -1;
> +
>   enum piglit_result
>   piglit_display(void)
>   {
>   	GLboolean pass = GL_TRUE;
>   	for (unsigned i = 0; i<  ARRAY_SIZE(tests); i++) {
> +		if (test_index != -1&&
> +		    test_index != i)
> +			continue;
> +
>   		TestCase test = tests[i];
>
>   		test.filter = GL_NEAREST;
> @@ -553,4 +559,7 @@ piglit_init(int argc, char **argv)
>   	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
>
>   	piglit_require_extension("GL_ARB_framebuffer_object");
> +
> +	if (argc == 2)
> +		sscanf(argv[1], "%d",&test_index);
>   }

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the Piglit mailing list