test suite failures on i386 and more
Brought to you by:
cannam
while packaging SonicVisualiser-3.0.3 for Debian, we experience a few failures of the test suites, namely on the good ole i386 architecture (and on more modern arm64 and s390x)
The i386 fails with:
PASS : TestScaleTickIntervals::linear_10000_20000_5()
Have 10 ticks, expected 11
0: have -0.9 "-0.9", expected -1 "-1.0"
1: have -0.7 "-0.7", expected -0.8 "-0.8"
2: have -0.5 "-0.5", expected -0.6 "-0.6"
3: have -0.3 "-0.3", expected -0.4 "-0.4"
4: have -0.1 "-0.1", expected -0.2 "-0.2"
5: have 0.1 "0.1", expected 0 "0.0"
6: have 0.3 "0.3", expected 0.2 "0.2"
7: have 0.5 "0.5", expected 0.4 "0.4"
8: have 0.7 "0.7", expected 0.6 "0.6"
9: have 0.9 "0.9", expected 0.8 "0.8"
FAIL! : TestScaleTickIntervals::linear_m1_1_10() Compared values are not the same
Loc: [o/../svcore/base/test/TestScaleTickIntervals.h(71)]
A full build-log can be found here
The other builds fail with a more obscure error that seems to be related to apple-lossless decoding, which i suspect is a bug in the underlying decoding libraries rather than in SV itself.
All build-logs from the Debian build-farm can be found on the packages buildd page
I can confirm this issue on archlinux32.
replacing the -1 by -1.01 in line 285 of svcore/base/test/TestScaleTickIntervals.h fixes the issue for me
of course one can always adjust the expected test results until the tests succeed :-)
seriously, do you know the implications of your hack on non-i386 architectures?
actually, the build can be fixed on i386 by adding
-ffloat-storeto the CFLAGS/CXXFLAGS.unfortunately this doesn't seem to help on
s390xandarm64I believe this should be fixed in v3.1 and recent repo code.