octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __osmesa_print__.cc-tst


From: Andreas Weber
Subject: Re: __osmesa_print__.cc-tst
Date: Thu, 14 Jul 2016 19:05:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0

Hi Dimitri,

Am 14.07.2016 um 18:52 schrieb Dmitri A. Sergatskov:
> __osmesa_print__.cc-tst is failing and i do not understand how it cannot:
>
> test __osmesa_print__.cc-tst
> ***** testif HAVE_OPENGL, HAVE_OSMESA, HAVE_GL2PS_H
>  if (isunix ())
>    h = figure ("visible", "off");
>    fn = tempname ();
>    sombrero ();
>    __osmesa_print__ (h, fn, "svg");
>    assert (stat (fn).size, 2692270, -0.1);
>    unlink (fn);
>    img = __osmesa_print__ (h);
>    assert (size (img), [get(h, "position")([4, 3]), 3]);
>    ## Use pixel sum per RGB channel as fingerprint
>    img_fp = squeeze (sum (sum (img), 2));
>    assert (img_fp, [52942515; 54167797; 56158178], -0.05);
>  endif
> !!!!! test failed
> ASSERT errors for:  assert (stat (fn).size,2692270,-0.1)
>
>   Location  |  Observed  |  Expected  |  Reason
>      ()        2408026      2692270      Rel err 0.10558 exceeds tol 0.1
>
>
> The SVG file contains all kind of metadata that will vary from
> computer to
> computer (and even may change with libraries update), so the size will
> be different each time. I definitely get different size on different
> computers
> (with the same hg snapshot).

As I wrote the test I thought the differences will be within 10%
(assert..., -0.1)
I think the best would be to have some kind of visual fingerprint, build
blocks.., whatever.
What would you suggest to comapre if an image is as expected?

> Perhaps there is a chance if we write to png and than strip metadata
> with "gm mogrifi -strip".
Yes, perhaps. Does the MXE windows build has "gm"?
-- Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]