From ffccc5a021632ba6989575da46a74bde0269fd8d Mon Sep 17 00:00:00 2001 From: Katja Marttila Date: Fri, 5 Jun 2020 07:41:08 +0300 Subject: Fix InstallAction type when updating components Components should be selected for update using model, not components own check state so model values stay in sync. Wrong InstallAction type will cause component to think it will be installed when that is not the case. This caused problems in install scripts when trying to figure out if component is going to be installed or not. Task-number: QTIFW-1830 Change-Id: I367f476de96f27b27d74e06a6fb630f0876924d2 Reviewed-by: Arttu Tarkiainen --- .../auto/installer/commandlineupdate/tst_commandlineupdate.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp index bf6d8729a..e260ab175 100644 --- a/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp +++ b/tests/auto/installer/commandlineupdate/tst_commandlineupdate.cpp @@ -73,12 +73,18 @@ private slots: setRepository(":///data/installPackagesRepositoryUpdate"); core->updateComponentsSilently(QStringList() << "componentA"); + // componentD is autodependent and cannot be deselected + // componentE is a forced component and thus will be updated VerifyInstaller::verifyInstallerResources(m_installDir, "componentA", "2.0.0content.txt"); VerifyInstaller::verifyInstallerResources(m_installDir, "componentB", "1.0.0content.txt"); + VerifyInstaller::verifyInstallerResources(m_installDir, "componentD", "2.0.0content.txt"); + VerifyInstaller::verifyInstallerResources(m_installDir, "componentE", "2.0.0content.txt"); VerifyInstaller::verifyInstallerResourceFileDeletion(m_installDir, "componentA", "1.0.0content.txt"); + VerifyInstaller::verifyInstallerResourceFileDeletion(m_installDir, "componentD", "1.0.0content.txt"); + VerifyInstaller::verifyInstallerResourceFileDeletion(m_installDir, "componentE", "1.0.0content.txt"); VerifyInstaller::verifyFileExistence(m_installDir, QStringList() << "components.xml" << "installcontentA_update.txt" - << "installcontentE.txt" << "installcontentG.txt" - << "installcontentB.txt" << "installcontentD.txt"); + << "installcontentE_update.txt" << "installcontentG.txt" + << "installcontentB.txt" << "installcontentD_update.txt"); } void testUpdateNoUpdatesForSelectedPackage() -- cgit v1.2.3