Fixing Jenkins tests
ClosedPublic

Authored by eingerman on Aug 29 2016, 2:57 AM.

Details

Reviewers
dkazakov
Group Reviewers
Krita
Commits
R37:365aea707614: Fixing Jenkins tests
Summary

Fixing unit tests that are failing in Jenkins runs.

Test Plan

Verify that Jenkins completes without errors

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
eingerman updated this revision to Diff 6341.Aug 29 2016, 2:57 AM
eingerman retitled this revision from to Fixing Jenkins tests.
eingerman updated this object.
eingerman edited the test plan for this revision. (Show Details)
eingerman added a reviewer: Krita.
eingerman set the repository for this revision to R37 Krita.
eingerman added inline comments.Aug 29 2016, 3:00 AM
libs/brush/tests/kis_auto_brush_test.cpp
119

KisDabShape produces dab of shape 10x5. From my reading of the code it's the test that's wrong. However, if KisDabShape code is wrong, please fix it. Dmitry, please check this, I think you know this part best.

libs/image/tests/kis_convolution_painter_test.cpp
283

Jenkins has a 2 min time limit. Trying to avoid it.

eingerman added inline comments.Aug 29 2016, 3:39 AM
libs/image/tests/kis_fixed_paint_device_test.cpp
255

Reducing the number of iterations to avoid Jenkins timeout.

libs/image/tests/kis_warp_transform_worker_test.cpp
349

Dmitry, approxChangeRect didn't match "true value". I can't tell which one is right. Please, check that this is expected value.

libs/ui/tests/kis_derived_resources_test.cpp
113

Dmitry, I see that several new signals are sent by setResource. I added them to the test. Please, check that that's expected behavior.

plugins/color/lcms2engine/tests/TestKoLcmsColorProfile.cpp
192

alarm has to be cmsMAXCHANNELS long with everything set to 0, except alarm values.

212

Wolthera, I'm assuming the test was incorrect. The input value is out of gamut, so we should get "alarm" value. So we should assert equality to alarm value. Please, check.

I have checked all the comments except the last one, which is @woltherav's field :)

The only trouble I see is the use of deprecated bzero function. The rest is perfectly fine with me! :)

libs/brush/tests/kis_auto_brush_test.cpp
119

Your fix looks correct :)

libs/image/tests/kis_convolution_painter_test.cpp
283

I would recommend adding a diff like that:

diff --git a/libs/image/tests/kis_convolution_painter_test.cpp b/libs/image/tests/kis_convolution_painter_test.cpp
index 755ace9..9a7c045 100644
--- a/libs/image/tests/kis_convolution_painter_test.cpp
+++ b/libs/image/tests/kis_convolution_painter_test.cpp
@@ -300,7 +300,7 @@ void KisConvolutionPainterTest::benchmarkConvolution()
 
         dbgKrita << "Diameter:" << diameter << "time:" << timer.elapsed();
 
-        if(diameter < 10) {
+        if(diameter < 1) {
             diameter += 2;
         } else {
             diameter += 8;

We use different algorithms for diameter < 5 and diameter > 5: spatial vs fftw, so it is useful to have the results for both ranges.

libs/image/tests/kis_fixed_paint_device_test.cpp
255

yep :)

libs/image/tests/kis_warp_transform_worker_test.cpp
349

That should be ok, because the rect is generated on a basis of a set of points sampled from the transform. The test might have broken because the sampling algorithm has changed.

libs/ui/tests/kis_derived_resources_test.cpp
113

Looks good!

plugins/color/lcms2engine/tests/TestKoLcmsColorProfile.cpp
192

yes, lcms docs confirms that :)

193

Please use memset instead. bzero is a deprecated function.

dkazakov accepted this revision.Aug 30 2016, 4:06 PM
dkazakov added a reviewer: dkazakov.

Hi, @eingerman!

Wolthera said that the patch is perfectly correct! So please push it! :)

This revision is now accepted and ready to land.Aug 30 2016, 4:06 PM
eingerman updated this revision to Diff 6379.Aug 31 2016, 3:10 AM
eingerman edited edge metadata.
This revision was automatically updated to reflect the committed changes.