aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/tst_tools.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2014-10-29 11:06:37 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-01-08 10:44:40 +0100
commit0fcbcb9ddf7fab9698bccbd75f1190640f641439 (patch)
treeac023966b7672615ef30f5c72a2c47a40ea2d180 /src/lib/corelib/tools/tst_tools.cpp
parent79bd57e2e8e4a8704c3588de8cc49487abf52652 (diff)
Do installation at build time.
This is useful for e.g. "packaging products" that work on the contents of installation folders. For this purpose, we also expose the install root as a property in the qbs module. Opt-out is available, and the "install" command still works. Change-Id: I346a8e6d19fc24b38660201b1f6fa510acc6676c Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'src/lib/corelib/tools/tst_tools.cpp')
-rw-r--r--src/lib/corelib/tools/tst_tools.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/corelib/tools/tst_tools.cpp b/src/lib/corelib/tools/tst_tools.cpp
index 549594b81..0c804499d 100644
--- a/src/lib/corelib/tools/tst_tools.cpp
+++ b/src/lib/corelib/tools/tst_tools.cpp
@@ -137,6 +137,7 @@ void TestTools::testBuildConfigMerging()
profile.setValue(QLatin1String("cpp.treatWarningsAsErrors"), true);
QVariantMap overrideMap;
overrideMap.insert(QLatin1String("qbs.toolchain"), QLatin1String("clang"));
+ overrideMap.insert(QLatin1String("qbs.installRoot"), QLatin1String("/blubb"));
SetupProjectParameters params;
params.setTopLevelProfile(profile.name());
params.setBuildVariant(QLatin1String("debug"));
@@ -148,13 +149,14 @@ void TestTools::testBuildConfigMerging()
QCOMPARE(finalMap.value(QLatin1String("topLevelKey")).toString(),
QString::fromLatin1("topLevelValue"));
const QVariantMap finalQbsMap = finalMap.value(QLatin1String("qbs")).toMap();
- QCOMPARE(finalQbsMap.count(), 3);
+ QCOMPARE(finalQbsMap.count(), 4);
QCOMPARE(finalQbsMap.value(QLatin1String("toolchain")).toString(),
QString::fromLatin1("clang"));
QCOMPARE(finalQbsMap.value(QLatin1String("buildVariant")).toString(),
QString::fromLatin1("debug"));
QCOMPARE(finalQbsMap.value(QLatin1String("architecture")).toString(),
QString::fromLatin1("Jean-Claude Pillemann"));
+ QCOMPARE(finalQbsMap.value(QLatin1String("installRoot")).toString(), QLatin1String("/blubb"));
const QVariantMap finalCppMap = finalMap.value(QLatin1String("cpp")).toMap();
QCOMPARE(finalCppMap.count(), 1);
QCOMPARE(finalCppMap.value(QLatin1String("treatWarningsAsErrors")).toBool(), true);