[Pixman] [PATCH] build: Distinguish SKIP and FAIL on Win32

Oded Gabbay oded.gabbay at gmail.com
Wed Dec 30 03:47:07 PST 2015


On Thu, Dec 24, 2015 at 12:36 PM, Andrea Canciani <ranma42 at gmail.com> wrote:
> The `check` target in test/Makefile.win32 assumed that any non-0 exit
> code from the tests was an error, but the testsuite is currently using
> 77 as a SKIP exit code (based on the convention used in autotools).
>
> Fixes fence-image-self-test and cover-test (now reported as SKIP).
>
> Signed-off-by: Andrea Canciani <ranma42 at gmail.com>
> ---
>  test/Makefile.win32 | 31 ++++++++++++++++++++-----------
>  1 file changed, 20 insertions(+), 11 deletions(-)
>
> diff --git a/test/Makefile.win32 b/test/Makefile.win32
> index bdd9b7f..d38f0c0 100644
> --- a/test/Makefile.win32
> +++ b/test/Makefile.win32
> @@ -19,26 +19,35 @@ OTHERS  = $(patsubst %,   $(CFG_VAR)/%.exe, $(OTHERPROGRAMS))
>  all: inform $(TESTS) $(OTHERS)
>
>  check: inform $(TESTS)
> -       @failures=0 ; \
> -       total=0 ; \
> +       @total=0 ; \
> +       pass=0 ; \
> +       skip=0 ; \
> +       fail=0 ; \
>         for test in $(TESTS) ; \
>         do \
>                 total=`expr $$total + 1` ; \
> -               if ./$$test ; \
> +               ./$$test ; \
> +               r=$$? ; \
> +               if test $$r -eq 0 ; \
>                 then echo "PASS: $$test" ; \
> +                   pass=`expr $$pass + 1` ; \
> +               elif test $$r -eq 77 ; \
> +               then echo "SKIP: $$test" ; \
> +                   skip=`expr $$skip + 1` ; \
>                 else echo "FAIL: $$test" ; \
> -                    failures=`expr $$failures + 1` ; \
> +                   fail=`expr $$fail + 1` ; \
>                 fi ; \
>         done ; \
> -       if test $$failures -eq 0 ; \
> -       then banner="All $$total tests passed" ; \
> -       else banner="$$failures of $$total tests failed" ; \
> -       fi ; \
> -       dashes=`echo "$$banner" | sed s/./=/g`; \
> +       dashes="============================================================================" ; \
>         echo "$$dashes" ; \
> -       echo "$$banner" ; \
> +       echo "Testsuite summary for pixman:" ; \
>         echo "$$dashes" ; \
> -       test $$failures -eq 0
> +       echo "# TOTAL: $$total" ; \
> +       echo "# PASS:  $$pass" ; \
> +       echo "# SKIP:  $$skip" ; \
> +       echo "# FAIL:  $$fail" ; \
> +       echo "$$dashes" ; \
> +       test $$fail -eq 0
>
>  $(CFG_VAR)/libutils.lib: $(libutils_OBJECTS)
>         @$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^
> --
> 2.5.4 (Apple Git-61)
>
> _______________________________________________
> Pixman mailing list
> Pixman at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pixman

Acked-by: Oded Gabbay <oded.gabbay at gmail.com>


More information about the Pixman mailing list