From 34adba4642ed75ada0468c278e81b868f7c375f2 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Mon, 22 Mar 2021 16:54:36 +0200 Subject: CLI: Fix offline installer creation with empty component meta-archive Task-number: QTIFW-2189 Change-Id: Ic6f56156194039cca7bebf095fad8c1fc66fc275 Reviewed-by: Qt CI Bot Reviewed-by: Katja Marttila --- .../A/1.0.2-1content.7z | Bin 0 -> 182 bytes .../A/1.0.2-1content.7z.sha1 | 1 + .../A/1.0.2-1meta.7z | Bin 0 -> 106 bytes .../repository-componentmeta-emptymetafile/Updates.xml | 16 ++++++++++++++++ tests/auto/installer/createoffline/settings.qrc | 5 +++++ .../auto/installer/createoffline/tst_createoffline.cpp | 3 +++ 6 files changed, 25 insertions(+) create mode 100644 tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z create mode 100644 tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1 create mode 100644 tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z create mode 100644 tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml (limited to 'tests') diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z new file mode 100644 index 000000000..1c5ff001a Binary files /dev/null and b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z differ diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1 b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1 new file mode 100644 index 000000000..b36346655 --- /dev/null +++ b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1 @@ -0,0 +1 @@ +5097e37368b44fc5242f3bb2fce08f5ade6c4c40 \ No newline at end of file diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z new file mode 100644 index 000000000..408550be6 Binary files /dev/null and b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z differ diff --git a/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml new file mode 100644 index 000000000..d3b180e43 --- /dev/null +++ b/tests/auto/installer/createoffline/data/repository-componentmeta-emptymetafile/Updates.xml @@ -0,0 +1,16 @@ + + {AnyApplication} + 1.0.0 + true + + A + A + Example component A + 1.0.2-1 + 2015-01-01 + true + + content.7z + 65c0db5bcf28139d434dce0e21674e33c87ab6d9 + + diff --git a/tests/auto/installer/createoffline/settings.qrc b/tests/auto/installer/createoffline/settings.qrc index 2c546d7f2..4b7666b4a 100644 --- a/tests/auto/installer/createoffline/settings.qrc +++ b/tests/auto/installer/createoffline/settings.qrc @@ -23,5 +23,10 @@ data/repository-unifiedmeta-script/Updates.xml data/repository-unifiedmeta-script/org.qtproject.ifw.example/1.0.0-1content.7z data/repository-unifiedmeta-script/org.qtproject.ifw.example/1.0.0-1content.7z.sha1 + + data/repository-componentmeta-emptymetafile/Updates.xml + data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z + data/repository-componentmeta-emptymetafile/A/1.0.2-1content.7z.sha1 + data/repository-componentmeta-emptymetafile/A/1.0.2-1meta.7z diff --git a/tests/auto/installer/createoffline/tst_createoffline.cpp b/tests/auto/installer/createoffline/tst_createoffline.cpp index 474b1d5de..3a3431442 100644 --- a/tests/auto/installer/createoffline/tst_createoffline.cpp +++ b/tests/auto/installer/createoffline/tst_createoffline.cpp @@ -85,6 +85,9 @@ private slots: QTest::newRow("Unified metaformat | Script") << ":///data/repository-unifiedmeta-script" << "org.qtproject.ifw.example" << PackageManagerCore::Success; + QTest::newRow("Component metaformat | Empty component meta-archive") + << ":///data/repository-componentmeta-emptymetafile" << "A" + << PackageManagerCore::Success; QTest::newRow("Non-existing component") << ":///data/repository-unifiedmeta-script" << "a.dummy.component" << PackageManagerCore::Canceled; -- cgit v1.2.3