aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/tst_blackbox.cpp
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-10-17 14:55:44 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-10-21 11:11:24 +0000
commit1353ac64cf542dcd0b174e2e77e9c37d86fcba39 (patch)
treedd8758dad62e048f76ae04e8b96ccc0b7876b14d /tests/auto/blackbox/tst_blackbox.cpp
parent02af2595540e7666b6aad1991599763230af339d (diff)
Add test for cpp.generateLinkerMapFile property
This test cover only the applications using the MSVC and GCC-like toolchains yet. Other toolchains and a product types can be added later if it will required. Change-Id: I37db96015774447e1e30b503d9853599be0177f2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_blackbox.cpp')
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index f65d462d2..d04ed91d8 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -6615,6 +6615,25 @@ void TestBlackbox::generatedArtifactAsInputToDynamicRule()
QVERIFY2(!m_qbsStdout.contains("generating"), m_qbsStdout.constData());
}
+void TestBlackbox::generateLinkerMapFile()
+{
+ QDir::setCurrent(testDataDir + "/generate-linker-map-file");
+ QCOMPARE(runQbs(), 0);
+ const bool isUsed = m_qbsStdout.contains("use test: true");
+ const bool isNotUsed = m_qbsStdout.contains("use test: false");
+ QVERIFY(isUsed != isNotUsed);
+ if (isUsed) {
+ QVERIFY(QFile::exists(relativeProductBuildDir("app-map")
+ + "/app-map.map"));
+ QVERIFY(!QFile::exists(relativeProductBuildDir("app-nomap")
+ + "/app-nomap.map"));
+ QVERIFY(!QFile::exists(relativeProductBuildDir("app-nomap-default")
+ + "/app-nomap-default.map"));
+ } else {
+ QSKIP("Unsupported toolchain. Skipping.");
+ }
+}
+
void TestBlackbox::generator()
{
QFETCH(QString, inputFile);