[Piglit] [PATCH] generatemipmap-base-change: replace assertion with printf
Vinson Lee
vlee at freedesktop.org
Sat Apr 2 19:25:01 UTC 2016
On Sat, Apr 2, 2016 at 7:41 AM, Brian Paul <brianp at vmware.com> wrote:
> And require an argument of either 'size' or 'format'.
> ---
> tests/texturing/generatemipmap-base-change.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/texturing/generatemipmap-base-change.c b/tests/texturing/generatemipmap-base-change.c
> index 3ea5698..92ee908 100644
> --- a/tests/texturing/generatemipmap-base-change.c
> +++ b/tests/texturing/generatemipmap-base-change.c
> @@ -44,7 +44,7 @@ piglit_init(int argc, char **argv)
> {
> #define MAX_SIZE 8
> GLubyte img[MAX_SIZE * MAX_SIZE * 4];
> - bool change_size = true, change_format = false;
> + bool change_size = false, change_format = false;
> int i;
> GLuint tex;
> GLsizei base_size, w0 = 0, h0 = 0;
> @@ -64,7 +64,11 @@ piglit_init(int argc, char **argv)
> change_format = true;
> }
> }
> - assert(change_size || change_format);
> +
> + if (!change_size && !change_format) {
> + printf("Missing required argument: 'size' or 'format'\n");
> + piglit_report_result(PIGLIT_SKIP);
> + }
>
> /* init image data */
> for (i = 0; i < sizeof(img); i++)
> --
> 1.9.1
>
Reviewed-by: Vinson Lee <vlee at freedesktop.org>
More information about the Piglit
mailing list