diff options
author | Tatiana Borisova <tatiana.borisova@qt.io> | 2021-12-23 15:12:05 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-13 18:34:44 +0000 |
commit | 11baadadbb650e7add0582e5c2509a7d8b1a9c27 (patch) | |
tree | 49a7f77f5e04cc7ec349bc19cfea2871f306cc5e | |
parent | 333b5df38c9cea555008c844d16480f52677406a (diff) | |
download | qtsvg-11baadadbb650e7add0582e5c2509a7d8b1a9c27.tar.gz |
Fix tst_qicon_svg, tst_qsvgplugin, tst_qsvgrenderer runtime failures
- add resources to binary for INTEGRITY (IGY is static build only)
Task-number: QTBUG-99123
Change-Id: If33215406210bb84be3b526bdae9d88ff04170f0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit f35dab51d7f222c98717e0d31224a6cdabfe804d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/qicon_svg/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/auto/qicon_svg/tst_qicon_svg.qrc | 1 | ||||
-rw-r--r-- | tests/auto/qsvgplugin/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/auto/qsvgplugin/resources.qrc | 5 | ||||
-rw-r--r-- | tests/auto/qsvgrenderer/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/qsvgrenderer/resources.qrc | 2 | ||||
-rw-r--r-- | tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 8 |
7 files changed, 21 insertions, 4 deletions
diff --git a/tests/auto/qicon_svg/CMakeLists.txt b/tests/auto/qicon_svg/CMakeLists.txt index 8c3fb88..e8dff42 100644 --- a/tests/auto/qicon_svg/CMakeLists.txt +++ b/tests/auto/qicon_svg/CMakeLists.txt @@ -29,6 +29,7 @@ set(tst_qicon_svg_resource_files "./icons/rect.svg" "./icons/rect_size_100percent.svg" "./icons/trash.svg" + "./icons/triangle.svg" ) qt_internal_add_resource(tst_qicon_svg "tst_qicon_svg" diff --git a/tests/auto/qicon_svg/tst_qicon_svg.qrc b/tests/auto/qicon_svg/tst_qicon_svg.qrc index 302b40b..da4a96b 100644 --- a/tests/auto/qicon_svg/tst_qicon_svg.qrc +++ b/tests/auto/qicon_svg/tst_qicon_svg.qrc @@ -6,5 +6,6 @@ <file>./icons/rect.svg</file> <file>./icons/trash.svg</file> <file>./icons/rect_size_100percent.svg</file> +<file>./icons/triangle.svg</file> </qresource> </RCC> diff --git a/tests/auto/qsvgplugin/CMakeLists.txt b/tests/auto/qsvgplugin/CMakeLists.txt index 5a8835a..802b796 100644 --- a/tests/auto/qsvgplugin/CMakeLists.txt +++ b/tests/auto/qsvgplugin/CMakeLists.txt @@ -4,6 +4,7 @@ ## tst_qsvgplugin Test: ##################################################################### +# Collect test data qt_internal_add_test(tst_qsvgplugin SOURCES tst_qsvgplugin.cpp @@ -30,6 +31,11 @@ set(resources_resource_files "wide_size.svg" "wide_size_viewbox.svg" "wide_viewbox.svg" + "simple_Utf8.svg" + "simple_Utf16LE.svg" + "simple_Utf16BE.svg" + "simple_Utf32LE.svg" + "simple_Utf32BE.svg" ) qt_internal_add_resource(tst_qsvgplugin "resources" diff --git a/tests/auto/qsvgplugin/resources.qrc b/tests/auto/qsvgplugin/resources.qrc index fd83b80..c41d655 100644 --- a/tests/auto/qsvgplugin/resources.qrc +++ b/tests/auto/qsvgplugin/resources.qrc @@ -14,5 +14,10 @@ <file>wide_size.svg</file> <file>wide_size_viewbox.svg</file> <file>wide_viewbox.svg</file> + <file>simple_Utf8.svg</file> + <file>simple_Utf16LE.svg</file> + <file>simple_Utf16BE.svg</file> + <file>simple_Utf32LE.svg</file> + <file>simple_Utf32BE.svg</file> </qresource> </RCC> diff --git a/tests/auto/qsvgrenderer/CMakeLists.txt b/tests/auto/qsvgrenderer/CMakeLists.txt index 26d263e..d64f137 100644 --- a/tests/auto/qsvgrenderer/CMakeLists.txt +++ b/tests/auto/qsvgrenderer/CMakeLists.txt @@ -19,6 +19,8 @@ qt_internal_add_test(tst_qsvgrenderer # Resources: set(resources_resource_files "heart.svgz" + "large.svg" + "large.svgz" ) qt_internal_add_resource(tst_qsvgrenderer "resources" diff --git a/tests/auto/qsvgrenderer/resources.qrc b/tests/auto/qsvgrenderer/resources.qrc index d666bcf..5f6a1ab 100644 --- a/tests/auto/qsvgrenderer/resources.qrc +++ b/tests/auto/qsvgrenderer/resources.qrc @@ -1,5 +1,7 @@ <!DOCTYPE RCC><RCC version="1.0"> <qresource> <file>heart.svgz</file> + <file>large.svg</file> + <file>large.svgz</file> </qresource> </RCC> diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index fca52ea..0315d91 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -809,13 +809,13 @@ void tst_QSvgRenderer::recursiveRefs() #ifndef QT_NO_COMPRESS void tst_QSvgRenderer::testGzLoading() { - QSvgRenderer renderer(QLatin1String(SRCDIR "heart.svgz")); + QSvgRenderer renderer(QFINDTESTDATA("heart.svgz")); QVERIFY(renderer.isValid()); QSvgRenderer resourceRenderer(QLatin1String(":/heart.svgz")); QVERIFY(resourceRenderer.isValid()); - QFile largeFileGz(SRCDIR "large.svgz"); + QFile largeFileGz(QFINDTESTDATA("large.svgz")); largeFileGz.open(QIODevice::ReadOnly); QByteArray data = largeFileGz.readAll(); QSvgRenderer autoDetectGzData(data); @@ -837,9 +837,9 @@ void tst_QSvgRenderer::testGzHelper_data() QTest::newRow("small") << QByteArray::fromHex(QByteArray("1f8b08005819934800034b" "cbcfe70200a865327e04000000")) << QByteArray("foo\n"); - QFile largeFileGz("large.svgz"); + QFile largeFileGz(QFINDTESTDATA("large.svgz")); largeFileGz.open(QIODevice::ReadOnly); - QFile largeFile("large.svg"); + QFile largeFile(QFINDTESTDATA("large.svg")); largeFile.open(QIODevice::ReadOnly); QTest::newRow("large") << largeFileGz.readAll() << largeFile.readAll(); |