[Piglit] [PATCH 1/2] teximage-errors: Run all the tests before returning result

Brian Paul brianp at vmware.com
Wed Mar 12 06:24:49 PDT 2014


On 03/11/2014 06:51 PM, Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>   tests/texturing/teximage-errors.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/tests/texturing/teximage-errors.c b/tests/texturing/teximage-errors.c
> index 221007f..39b7e9b 100644
> --- a/tests/texturing/teximage-errors.c
> +++ b/tests/texturing/teximage-errors.c
> @@ -171,13 +171,11 @@ test_pos_and_sizes(void)
>   enum piglit_result
>   piglit_display(void)
>   {
> -   if (!test_targets())
> -      return PIGLIT_FAIL;
> +   bool pass = true;
> +   pass = test_targets() && pass;
> +   pass = test_pos_and_sizes() && pass;
>
> -   if (!test_pos_and_sizes())
> -      return PIGLIT_FAIL;
> -
> -   return PIGLIT_PASS;
> +   return pass ? PIGLIT_PASS: PIGLIT_FAIL;
>   }
>
>
>

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



More information about the Piglit mailing list