summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer/commandlineupdate
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/installer/commandlineupdate')
-rw-r--r--tests/auto/installer/commandlineupdate/data/installPackagesRepository/Updates.xml16
-rw-r--r--tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator.enterprise.plugins/1.0.0content.7zbin0 -> 98 bytes
-rw-r--r--tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator/1.0.0content.7zbin0 -> 98 bytes
-rw-r--r--tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/Updates.xml32
-rw-r--r--tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator/2.0.0content.7zbin0 -> 106 bytes
-rw-r--r--tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui.enterprise.plugins/2.0.0content.7zbin0 -> 106 bytes
-rw-r--r--tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui/2.0.0content.7zbin0 -> 90 bytes
-rw-r--r--tests/auto/installer/commandlineupdate/settings.qrc6
-rw-r--r--tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp34
9 files changed, 86 insertions, 2 deletions
diff --git a/tests/auto/installer/commandlineupdate/data/installPackagesRepository/Updates.xml b/tests/auto/installer/commandlineupdate/data/installPackagesRepository/Updates.xml
index 9e01f1800..de6e66525 100644
--- a/tests/auto/installer/commandlineupdate/data/installPackagesRepository/Updates.xml
+++ b/tests/auto/installer/commandlineupdate/data/installPackagesRepository/Updates.xml
@@ -160,4 +160,20 @@
<ForcedUpdate>true</ForcedUpdate>
<DownloadableArchives>content.7z</DownloadableArchives>
</PackageUpdate>
+ <PackageUpdate>
+ <Name>qt.tools.qtcreator</Name>
+ <DisplayName>Component qtcreator. Depends on virtual component</DisplayName>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <Dependencies>qt.tools.qtcreator.enterprise.plugins</Dependencies>
+ <DownloadableArchives>content.7z</DownloadableArchives>
+ </PackageUpdate>
+ <PackageUpdate>
+ <Name>qt.tools.qtcreator.enterprise.plugins</Name>
+ <DisplayName>enterprise plugin component</DisplayName>
+ <Version>1.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <DownloadableArchives>content.7z</DownloadableArchives>
+ <Virtual>true</Virtual>
+ </PackageUpdate>
</Updates>
diff --git a/tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator.enterprise.plugins/1.0.0content.7z b/tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator.enterprise.plugins/1.0.0content.7z
new file mode 100644
index 000000000..5c7c4f37d
--- /dev/null
+++ b/tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator.enterprise.plugins/1.0.0content.7z
Binary files differ
diff --git a/tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator/1.0.0content.7z b/tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator/1.0.0content.7z
new file mode 100644
index 000000000..e5e4178a4
--- /dev/null
+++ b/tests/auto/installer/commandlineupdate/data/installPackagesRepository/qt.tools.qtcreator/1.0.0content.7z
Binary files differ
diff --git a/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/Updates.xml b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/Updates.xml
new file mode 100644
index 000000000..f55998c48
--- /dev/null
+++ b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/Updates.xml
@@ -0,0 +1,32 @@
+<Updates>
+ <ApplicationName>{AnyApplication}</ApplicationName>
+ <ApplicationVersion>1.0.0</ApplicationVersion>
+ <Checksum>false</Checksum>
+ <PackageUpdate>
+ <Name>qt.tools.qtcreator</Name>
+ <DisplayName>Component qtcreator. Dependency removed</DisplayName>
+ <Version>2.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <DownloadableArchives>content.7z</DownloadableArchives>
+ </PackageUpdate>
+ <PackageUpdate>
+ <Name>qt.tools.qtcreator_gui</Name>
+ <DisplayName>Component K. Autodepends on componentJ</DisplayName>
+ <Description>Component K. Autodepends on componentJ</Description>
+ <Version>2.0.0</Version>
+ <ReleaseDate>2014-08-25</ReleaseDate>
+ <AutoDependOn>qt.tools.qtcreator</AutoDependOn>
+ <DownloadableArchives>content.7z</DownloadableArchives>
+ </PackageUpdate>
+ <PackageUpdate>
+ <Name>qt.tools.qtcreator_gui.enterprise.plugins</Name>
+ <DisplayName>enterprise plugins, replaces another component</DisplayName>
+ <Version>2.0.0</Version>
+ <ReleaseDate>2018-03-14</ReleaseDate>
+ <Virtual>true</Virtual>
+ <Replaces>qt.tools.qtcreator.enterprise.plugins</Replaces>
+ <AutoDependOn>qt.tools.qtcreator</AutoDependOn>
+ <UpdateFile UncompressedSize="99" OS="Any" CompressedSize="305"/>
+ <DownloadableArchives>content.7z</DownloadableArchives>
+ </PackageUpdate>
+</Updates>
diff --git a/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator/2.0.0content.7z b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator/2.0.0content.7z
new file mode 100644
index 000000000..f2b69fc13
--- /dev/null
+++ b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator/2.0.0content.7z
Binary files differ
diff --git a/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui.enterprise.plugins/2.0.0content.7z b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui.enterprise.plugins/2.0.0content.7z
new file mode 100644
index 000000000..03d191cb5
--- /dev/null
+++ b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui.enterprise.plugins/2.0.0content.7z
Binary files differ
diff --git a/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui/2.0.0content.7z b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui/2.0.0content.7z
new file mode 100644
index 000000000..515c3a5cf
--- /dev/null
+++ b/tests/auto/installer/commandlineupdate/data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui/2.0.0content.7z
Binary files differ
diff --git a/tests/auto/installer/commandlineupdate/settings.qrc b/tests/auto/installer/commandlineupdate/settings.qrc
index d398abe30..c8f328d6b 100644
--- a/tests/auto/installer/commandlineupdate/settings.qrc
+++ b/tests/auto/installer/commandlineupdate/settings.qrc
@@ -17,6 +17,8 @@
<file>data/installPackagesRepository/componentF.subcomponent1.subsubcomponent2/1.0.0content.7z</file>
<file>data/installPackagesRepository/componentF.subcomponent2.subsubcomponent1/1.0.0content.7z</file>
<file>data/installPackagesRepository/componentF.subcomponent2.subsubcomponent2/1.0.0content.7z</file>
+ <file>data/installPackagesRepository/qt.tools.qtcreator/1.0.0content.7z</file>
+ <file>data/installPackagesRepository/qt.tools.qtcreator.enterprise.plugins/1.0.0content.7z</file>
<file>data/installPackagesRepositoryUpdate/Updates.xml</file>
<file>data/installPackagesRepositoryUpdate/componentA/1.0.0content.7z</file>
<file>data/installPackagesRepositoryUpdate/componentB/2.0.0content.7z</file>
@@ -52,5 +54,9 @@
<file>data/repositoryWithDependencyToEssential/Updates.xml</file>
<file>data/repositoryWithDependencyToEssential/componentAutoDependOnA/1.0content.7z</file>
<file>data/repositoryWithDependencyToEssential/componentA/3.0.0content.7z</file>
+ <file>data/repositoryUpdateWithReplacements/Updates.xml</file>
+ <file>data/repositoryUpdateWithReplacements/qt.tools.qtcreator/2.0.0content.7z</file>
+ <file>data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui/2.0.0content.7z</file>
+ <file>data/repositoryUpdateWithReplacements/qt.tools.qtcreator_gui.enterprise.plugins/2.0.0content.7z</file>
</qresource>
</RCC>
diff --git a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
index 338157cba..0faeecf74 100644
--- a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
+++ b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp
@@ -295,7 +295,7 @@ private slots:
componentResourcesAfterUpdate.append(ComponentResource("componentA", "1.0.0content.txt"));
componentResourcesAfterUpdate.append(ComponentResource("componentB", "2.0.0content.txt"));
componentResourcesAfterUpdate.append(ComponentResource("componentD", "2.0.0content.txt"));//AutodepenOn componentA,componentB
- componentResourcesAfterUpdate.append(ComponentResource("componentE", "2.0.0content.txt"));//ForcedInstall
+ componentResourcesAfterUpdate.append(ComponentResource("componentE", "1.0.0content.txt"));//ForcedInstall, not updated without user selection
componentResourcesAfterUpdate.append(ComponentResource("componentG", "1.0.0content.txt"));
deletedComponentResources.clear();
@@ -316,8 +316,38 @@ private slots:
<< componentResourcesAfterUpdate
<< (QStringList() << "components.xml" << "installcontent.txt" << "installcontentA.txt"
<< "installcontentD_update.txt" << "installcontentB_update.txt"
- << "installcontentE_update.txt" << "installcontentG.txt")
+ << "installcontentE.txt" << "installcontentG.txt")
<< deletedComponentResources;
+
+ /*********** Update packages with replacements **********/
+ componentResources.clear();
+ componentResources.append(ComponentResource("qt.tools.qtcreator", "1.0.0content.txt"));
+ componentResources.append(ComponentResource("qt.tools.qtcreator.enterprise.plugins", "1.0.0content.txt"));
+ componentResources.append(ComponentResource("componentE", "1.0.0content.txt"));
+
+ componentResourcesAfterUpdate.clear();
+ componentResourcesAfterUpdate.append(ComponentResource("qt.tools.qtcreator", "2.0.0content.txt"));
+ componentResourcesAfterUpdate.append(ComponentResource("qt.tools.qtcreator_gui", "2.0.0content.txt"));
+ componentResourcesAfterUpdate.append(ComponentResource("qt.tools.qtcreator_gui.enterprise.plugins", "2.0.0content.txt"));
+ componentResourcesAfterUpdate.append(ComponentResource("componentE", "1.0.0content.txt"));
+
+ deletedComponentResources.clear();
+ deletedComponentResources.append(ComponentResource("qt.tools.qtcreator.enterprise.plugins", "1.0.0content.txt"));
+
+ QTest::newRow("Update packages with replacements")
+ << ":///data/installPackagesRepository"
+ << (QStringList()<< "qt.tools.qtcreator")
+ << PackageManagerCore::Success
+ << componentResources
+ << (QStringList() << "components.xml" << "installcontentA.txt" << "installcontentE.txt" << "installcontentG.txt"
+ << "installcontent.txt" << "qtcreator.txt" << "plugins.txt")
+ << ":///data/repositoryUpdateWithReplacements"
+ << (QStringList() << "qt.tools.qtcreator")
+ << PackageManagerCore::Success
+ << componentResourcesAfterUpdate
+ << (QStringList() << "components.xml" << "installcontentA.txt" << "installcontentE.txt" << "installcontentG.txt"
+ << "installcontent.txt" << "gui.txt" << "qtcreator2.txt" << "gui_plugins.txt")
+ << deletedComponentResources;
}
void testUpdate()