aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-11-20 13:47:55 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-11-21 15:20:58 +0100
commitb9aca56026562b0fd6ff2fd2717e20666f40b98a (patch)
tree467071fca4248a8b19e9396988336ce5a970398c /tests/auto/blackbox
parent8b9026c3e8eca11b9859b17f152c8a01c93dc900 (diff)
Take the qbs.install* properties into account when change tracking.
These are currently ignored, because we only look for properties that were requested in prepare scripts. This does not typically happen for installation parameters, but since they end up in the output artifacts, changes to them still require re-setting up the respective build data. Task-number: QBS-359 Change-Id: I571cb4c1a02ea790ddde2f244136c6a0fd6fb627 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 0700df165..c796d3e61 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -1456,6 +1456,29 @@ void TestBlackbox::installedApp()
+ HostOsInfo::appendExecutableSuffix(QLatin1String("/usr/bin/installedApp"))));
QVERIFY(!addedFile.exists());
+ // Check whether changing install parameters on the product causes re-installation.
+ QFile projectFile("installed_artifact.qbs");
+ QVERIFY(projectFile.open(QIODevice::ReadWrite));
+ QByteArray content = projectFile.readAll();
+ content.replace("qbs.installPrefix: \"/usr\"", "qbs.installPrefix: '/usr/local'");
+ waitForNewTimestamp();
+ projectFile.resize(0);
+ projectFile.write(content);
+ QVERIFY(projectFile.flush());
+ QCOMPARE(runQbs(QbsRunParameters(QStringList("install"))), 0);
+ QVERIFY(QFile::exists(defaultInstallRoot
+ + HostOsInfo::appendExecutableSuffix(QLatin1String("/usr/local/bin/installedApp"))));
+
+ // Check whether changing install parameters on the artifact causes re-installation.
+ content.replace("qbs.installDir: \"bin\"", "qbs.installDir: 'custom'");
+ waitForNewTimestamp();
+ projectFile.resize(0);
+ projectFile.write(content);
+ projectFile.close();
+ QCOMPARE(runQbs(QbsRunParameters(QStringList("install"))), 0);
+ QVERIFY(QFile::exists(defaultInstallRoot
+ + HostOsInfo::appendExecutableSuffix(QLatin1String("/usr/local/custom/installedApp"))));
+
rmDirR(buildDir);
QbsRunParameters params;
params.arguments << "install" << "--no-build";