cslarsen / jp2a

Converts jpg images to ASCII
GNU General Public License v2.0
782 stars 70 forks source link

Several tests fails in Debian #5

Open eribertomota opened 7 years ago

eribertomota commented 7 years ago

Hi,

It is not normal in Debian. So, I think that has a problem in tests. The 1.0.6 version works fine.

Thanks!

Eriberto

./run-tests.sh

TESTING JP2A BUILD

Note that the output may vary a bit on different platforms, so some tests may fail. This does not mean that jp2a is

completely broken.

test ( 1) (width) FAILED test ( 2) (border, width) FAILED test ( 3) (size) ./run-tests.sh, linha 53: 19518 Exceção de ponto flutuante ../src/jp2a --size=160x49 jp2a.jpg FAILED test ( 4) (height) FAILED test ( 5) (size) FAILED test ( 6) (size) FAILED test ( 7) (invert, border) ./run-tests.sh, linha 53: 19530 Exceção de ponto flutuante ../src/jp2a -i -b --width=110 --height=30 jp2a.jpg FAILED test ( 8) (width, flip, invert) FAILED test ( 9) (width, border) FAILED test (10) (width, verbose) FAILED test (11) (width, outfile) FAILED test (12) (width, clear) FAILED test (13) (height, grayscale) FAILED test (14) (size, invert) FAILED test (15) (size, invert, red channel) FAILED test (16) (size, invert, blue channel) FAILED test (17) (size, invert, green channel) FAILED test (18) (width, grayscale) FAILED test (19) (invert, width, grayscale) FAILED test (20) (invert, size, grayscale) FAILED test (21) (size, invert, border) FAILED test (22) (color) FAILED test (23) (color, grayscale) FAILED test (24) (standard input, width) FAILED test (25) (standard input, width, height) FAILED test (26) (big size) OK

TEST RESULTS FOR JP2A

Tests OK : 1 of 26 ( 3%) Tests FAILED: 25 of 26 ( 96%)

Summary of failed tests:

../src/jp2a --width=78 jp2a.jpg | diff --strip-trailing-cr --brief - normal.txt ../src/jp2a -b --width=78 jp2a.jpg | diff --strip-trailing-cr --brief - normal-b.txt ../src/jp2a --size=160x49 jp2a.jpg | diff --strip-trailing-cr --brief - 160x49.txt ../src/jp2a --height=10 jp2a.jpg | diff --strip-trailing-cr --brief - 10h.txt ../src/jp2a --size=40x40 jp2a.jpg | diff --strip-trailing-cr --brief - 40x40.txt ../src/jp2a --size=1x1 --invert jp2a.jpg | diff --strip-trailing-cr --brief - 1x1-inv.txt ../src/jp2a -i -b --width=110 --height=30 jp2a.jpg | diff --strip-trailing-cr --brief - 110x30-i-b.txt ../src/jp2a --width=78 --flipx --flipy --invert jp2a.jpg | diff --strip-trailing-cr --brief - flip-xy-invert.txt ../src/jp2a --width=78 -b jp2a.jpg jp2a.jpg | diff --strip-trailing-cr --brief - 2xnormal-b.txt ' | diff --strip-trailing-cr --brief - normal-verbose.txt ../src/jp2a --width=78 jp2a.jpg --output=/tmp/jp2a-test-CCMjSZ && cat /tmp/jp2a-test-CCMjSZ | diff --strip-trailing-cr --brief - normal.txt ../src/jp2a --width=78 jp2a.jpg --clear | diff --strip-trailing-cr --brief - normal-clear.txt ../src/jp2a logo-40x25-gray.jpg --height=30 | diff --strip-trailing-cr --brief - logo-30.txt ../src/jp2a grind.jpg -i --size=80x30 | diff --strip-trailing-cr --brief - grind.txt ../src/jp2a grind.jpg -i --size=80x30 --red=1.0 --green=0.0 --blue=0.0 | diff --strip-trailing-cr --brief - grind-red.txt ../src/jp2a grind.jpg -i --size=80x30 --red=0.0 --green=1.0 --blue=0.0 | diff --strip-trailing-cr --brief - grind-green.txt ../src/jp2a grind.jpg -i --size=80x30 --red=0.0 --green=0.0 --blue=1.0 | diff --strip-trailing-cr --brief - grind-blue.txt ../src/jp2a --width=78 dalsnuten-640x480-gray-low.jpg | diff --strip-trailing-cr --brief - dalsnuten-normal.txt ../src/jp2a --invert --width=78 dalsnuten-640x480-gray-low.jpg | diff --strip-trailing-cr --brief - dalsnuten-invert.txt ../src/jp2a --invert --size=80x49 dalsnuten-640x480-gray-low.jpg | diff --strip-trailing-cr --brief - dalsnuten-80x49-inv.txt ../src/jp2a dalsnuten-640x480-gray-low.jpg --size=80x25 --invert --border --size=150x45 | diff --strip-trailing-cr --brief - dalsnuten-640x480-gray-low.txt ../src/jp2a grind.jpg --color --width=60 | diff --strip-trailing-cr --brief - grind-color.txt ../src/jp2a dalsnuten-640x480-gray-low.jpg --color --width=78 | diff --strip-trailing-cr --brief - dalsnuten-color.txt ../src/jp2a 2>/dev/null ; cat jp2a.jpg | ../src/jp2a --width=78 - | diff --strip-trailing-cr --brief - normal.txt ../src/jp2a 2>/dev/null ; cat jp2a.jpg | ../src/jp2a - --width=40 --height=40 | diff --strip-trailing-cr --brief - 40x40.txt

cslarsen commented 7 years ago

The tests are very flaky, though. The test outputs, which can change depending on compilation flags (especially floating point rounding errors, optimizations etc). If you can convert images and they look nice to you, then that's enough. Should use unit tests instead of end-to-end testing.

eribertomota commented 7 years ago

Thanks!

cslarsen commented 7 years ago

See my other comment. The changes since 1.0.6 are complete garbage, unfortunately :) I don't think anyone should use anything older than 1.0.6

cslarsen commented 7 years ago

Is this one fixed now?

eribertomota commented 7 years ago

No. I disabled the tests in Debian. See here[1].

[1] https://sources.debian.net/src/jp2a/1.0.7-1/debian/rules/

Thanks!