Skip to content

Test loading icc profile in TestSvgParser::testIccColor

Alvin Wong requested to merge alvinwong/krita:alvin/TestSvgParser into master

The reason for this change is that this test fails on my local Windows build. At first it is failing from:

QFATAL : TestSvgParser::testIccColor() ASSERT (krita): "file.exists()" in file D:\dev\krita\src-master\libs\flake\tests\TestSvgParser.cpp, line 1140
FAIL!  : TestSvgParser::testIccColor() Received a fatal error.

After investigating, I found that this file fetcher does not get called on Linux at all because the profile has already been loaded from other code paths. On Windows it is called because the uniqueId of the icc profile is different from the expected value.

This MR attempts to make it so the file fetcher also gets used on Linux (by removing the icc profile under test before the test), and restore the numFetches check removed in !675 (f2831368).

I have not been able to find out the root cause of the uniqueId mismatch yet, so the test is still failing on Windows:

QWARN  : TestSvgParser::testIccColor() krita.lib.flake: WARNING: ProfileID of the attached profile doesn't match the one mentioned in SVG element
QWARN  : TestSvgParser::testIccColor() krita.lib.flake:         profile->uniqueId().toHex() = "84f64878faf21217362594685be031d5"
QWARN  : TestSvgParser::testIccColor() krita.lib.flake:         uniqueId.toHex() = "133a66607cffeebdd64dd433ada9bf4e"
QWARN  : TestSvgParser::testIccColor() krita.lib.flake: WARNING: ProfileID of the attached profile doesn't match the one mentioned in SVG element
QWARN  : TestSvgParser::testIccColor() krita.lib.flake:         profile->uniqueId().toHex() = "84f64878faf21217362594685be031d5"
QWARN  : TestSvgParser::testIccColor() krita.lib.flake:         uniqueId.toHex() = "133a66607cffeebdd64dd433ada9bf4e"
FAIL!  : TestSvgParser::testIccColor() Compared values are not the same
   Actual   (numFetches): 2
   Expected (1)         : 1

Merge request reports