mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-14 02:54:19 -04:00
SKIP tests when libheif configuration is incomplete
This commit is contained in:
@ -258,6 +258,15 @@ int main(int argc, char **argv)
|
|||||||
});
|
});
|
||||||
QTextStream(stdout) << "QImageReader::supportedImageFormats: " << formatStrings.join(", ") << "\n";
|
QTextStream(stdout) << "QImageReader::supportedImageFormats: " << formatStrings.join(", ") << "\n";
|
||||||
|
|
||||||
|
if (!formats.contains(format)) {
|
||||||
|
if (format == "avci" || format == "heif" || format == "hej2") {
|
||||||
|
QTextStream(stdout) << "WARNING : " << suffix << " is not supported with current libheif configuration!\n"
|
||||||
|
<< "********* "
|
||||||
|
<< "Finished basic read tests for " << suffix << " images *********\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const QFileInfoList lstImgDir = imgdir.entryInfoList();
|
const QFileInfoList lstImgDir = imgdir.entryInfoList();
|
||||||
// Launch 2 runs for each test: first run on a random access device, second run on a sequential access device
|
// Launch 2 runs for each test: first run on a random access device, second run on a sequential access device
|
||||||
for (int seq = 0; seq < 2; ++seq) {
|
for (int seq = 0; seq < 2; ++seq) {
|
||||||
|
@ -622,8 +622,24 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// run test
|
|
||||||
auto suffix = args.at(0);
|
auto suffix = args.at(0);
|
||||||
|
|
||||||
|
// skip test if libheif configuration is obviously incomplete
|
||||||
|
QByteArray format = suffix.toLatin1();
|
||||||
|
const QList<QByteArray> read_formats = QImageReader::supportedImageFormats();
|
||||||
|
const QList<QByteArray> write_formats = QImageWriter::supportedImageFormats();
|
||||||
|
|
||||||
|
if (!read_formats.contains(format) && format == "heif") {
|
||||||
|
QTextStream(stdout) << "WARNING : libheif configuration is missing necessary decoder(s)!\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!write_formats.contains(format) && format == "heif") {
|
||||||
|
QTextStream(stdout) << "WARNING : libheif configuration is missing necessary encoder(s)!\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// run test
|
||||||
auto ret = basicTest(suffix, parser.isSet(lossless), parser.isSet(ignoreDataCheck), parser.isSet(skipOptTest), fuzzarg);
|
auto ret = basicTest(suffix, parser.isSet(lossless), parser.isSet(ignoreDataCheck), parser.isSet(skipOptTest), fuzzarg);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
ret = formatTest(suffix, parser.isSet(createFormatTempates));
|
ret = formatTest(suffix, parser.isSet(createFormatTempates));
|
||||||
|
Reference in New Issue
Block a user